combo box dependant on text box

MelanieP

Registered User.
Local time
Today, 23:43
Joined
Jun 22, 2005
Messages
22
Hi

I would like to know how can i reference a combo box to the value of a text box on the form it is for a purchasing system.

if i select product one i only want the the order quantity for that item to show and the same with the price field as all the reorder levels and cost information is stored in a table. i have created queries only selecting the product code and reorder quantity and the product code and the cost price.

hope someone will be able to help

regards
melanie
 
Hi Melanie,
I'm sorry but what you said does not make a lot of sense to me but that could be that I haven't had enough coffee yet. :p Would the Column property of a ComboBox work?
Me.ComboBoxName.Column(n) where n is a zero based column index.
 
the procedure is i scan a barcode of a product then it will bring up all the information for that product but the price and qty field must only show the data for that product which they can select or do a manual input. so if a take product 1 the details will appear but the combo box must only show the reorder level for that specific product and the price combo box must only show the price for that specific product. if they do not want to selelct the prespecified data they must be able to enter it in manually. my problem is that i must restrict the combo box to show that product qty and price only in the combo boxes

thanks for your help so far

regards mel
 
Any chance of posting a screen shot? It sounds like you want the ComboBoxes to *only* display one row of information. If that's true then why have you chosen ComboBoxes. Why not just use TextBoxes and fill them from the AfterUpdate event of the control that accepts the Product Barcode?
 
Hi RuralGuy

That is correct if must only have 1 line of data in. If they dont want the prespecified data they must be able to put in their own qty and price. as i have an update on cost if cost is lower keep it and it cost is higher update it if they take the prespecified price the price stays the same. i have attached a screen clip of the po form.

Regards mel
 

Attachments

  • po.gif
    po.gif
    55.9 KB · Views: 136
Hi Melanie,
I only see two ComboBoxes on the screen capture: Supplier and Vat. Are the quantity and price you refer to the QTY Order and Unit Co$t controls? They do not look like ComboBoxes to me; are they? Which control do you scan data into?
 
I think I understand what you want. When the user selects a product from the combo, you want two text boxes to be populated with the quantity and price, but the user can overtype these with different values.

In you query that your combo is based on, you need to include the quantity and price. If you don't want these visible to the user, set the relevant combo column widths to zero. Then in the AfterUpdate event use a bit of VBA to populate the text boxes. Like the attached.
 

Attachments

Thanks for poping in Neil. This rusty old brain was having a tough time with this one and I felt sorry that Melanie had to put up with me. I hope that's what she needs. It sounds right.
 
Hi niel

thank you very much for your reply and ruralguy you are great. the version of access i am working on is version 2. would that be able to work.

mel
 
Dunno, sorry. It's a long time since Access 2. I though that I was way behind using A2k!
 
Wow Mel,
That PreDates me too. I don't have a clue but I'll bet Neil stops sending you ac2K db's to open. :p Maybe we can just keep working the way we were by supplying answers to these previous questions.
I only see two ComboBoxes on the screen capture: Supplier and Vat. Are the quantity and price you refer to the QTY Order and Unit Co$t controls? They do not look like ComboBoxes to me; are they? Which control do you scan data into?
 
Hi RuralGuy

that is correct the qty and cost field is only text fields i have attached a new screen clip where i have added the combo boxes and manual input boxes but i need to only get the combo boxes to display the qty and cost for the product code which is where the scanning take place the product code is the trigger key.

regards mel
 

Attachments

  • posample.gif
    posample.gif
    24.5 KB · Views: 123
Hi RuralGuy

i mannage to get the query to filter the data properly by adding the following criteria to the query

[Forms]![Goods Receive Details Mainform]![Embedded40].[Form]![Product Code]

but now all i need to know is where to focus this so it applies each time i select the combo box the query runs perfectly and the criteria selects the correct data but i can not get it to update the combo box.

thanks mel
 
Hi Melanie,
I'm afraid I have to ask the same question again:
It sounds like you want the ComboBoxes to *only* display one row of information. If that's true then why have you chosen ComboBoxes. Why not just use TextBoxes and fill them from the AfterUpdate event of the control that accepts the Product Barcode?
 
Hello

the reason why i use combo boxes is that the level of computer literacy here is null and zero so we have to make it as easy as possible for the users. The combo boxes stipulates that it is a pre-set amount and the next text box is a manual entry text box so if they dont want to use the pre-set they can enter manually but if they want to use a pre-set they can choose it from the drop down box which cuts out a lot of confusion for them as we have tested it with list boxes but they got to confused. We are very limited on how to write software here in SA as the user functionality has to be extremely simple to use.

mel
 

Users who are viewing this thread

Back
Top Bottom