Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using of combobox with message alert

Status
Not open for further replies.

misulica

Programmer
Feb 8, 2003
43
RO
I have a form with a product name view in a textbox and product pieces view in another textbox.I need a combobox with a column with numbers from 1 to 9, so when i select 5 for example, automatically the pieces of that product to decrease by 5(changes to be made in the table).Also, if i select a number greater then the number of pieces, a message alert must prevent me.
Many thanks
 
Hi Misulica,

Dont think of a combo box for this. I suggest you to use a SPINNER for this.

In your form.. Against the quantity.. drop SPINNER button from the Forms Tool Bar. The one looking with Up and Down keys. You can set the control source just as you do to a text box. When run.. if Up arrow is pressed or down arrow is clicked.. the value will be incremeted or decremented.

Then in its Valid event, you can check against the available quantity and throw a message if quantity picked is more than the available quantity as shown in the TextBox control said by you. This shall not be a problem.

In your save button Click event, provide code to minimise the stock etc.. as per your desire. :) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top