combo box problem (should be simple)

catcoota

Registered User.
Local time
Today, 19:01
Joined
Aug 22, 2003
Messages
30
Hiiii how is every one !

My problem is related to comboxes

I have a form which has data based on query, one of the controls is a combo box (productID) ... when i select the productID from the combobox I want it to renew the rest of the controls so that it is linked to the same record

example:

I have this table called product, which has the following data

product ID productName
1 ABC
2 XYZ

When I select productID = 2 , i want the field called ProductName to change automatically to the XYZ, but it does not change!!


BTW, this is just an example of my problem, & i don't want to change only one field (productName), i have a couple of other fields i want to chane (qty, orderQty, etc)

I think it is simple but i don't know how to do it???

Thanks in advance
 
So, are you saying you want to go to the record based on the selected PrimaryID? I'm fuzzy on what you actually want.

When you say Field are you actually referring to a Bound Control i.e a textbox bound to a field in your query?
 
Mile-O-Phile said:
So, are you saying you want to go to the record based on the selected PrimaryID?

Yah, exactly that's what i want to do :)
 
Base the form on a query that joins the order details table to the product table. That way you can select columns from both tables to show on the form. When you select a product, the related product fields will auto-populate.

This is called an "autolookup query" if you care to read about it here or in help.
 
Hi
Thanks very much for the reply Pat Harmnan

I tried ur solution, but unfortunately I still can't solve the problem! maybe I didn't understand u well?

Anyway, I did this
I made a query called ProductOrder based on the 2 linked tables Orders & Products and then I went to a form bound to the query, chose a combo box and I selected the 3rd choice of the Wizard which is (Find a record on the form based on the value I selected in my combo box). But when i select the value (Suppose PName), i get this error message

syntax.jpg


By the way (off-topic question) : can i change a text box into a combo box without creating a combobox from scratch?

Thanks
 
1. Delete the button and start again.

2. You can change a textbox to a combo, but you'll need to set all the properties like number of columns, column widths, rowsource, etc. yourself.
 
Hello

Thanks again, but I still can't get it to work! :( any suggestions?

BTW: what is the method to change the text into a combo?

Thanks
 
I cant answer your major problem but to change the box type

right click on the text box or what have you and click on CHANGE TO. You get options to what you want to change it too.
 

Users who are viewing this thread

Back
Top Bottom