help the new guy

  • Thread starter Thread starter bjakes
  • Start date Start date
B

bjakes

Guest
I want to make a small form (6 fields) How do I put a drop down list on my form that will select items from a small table? (the drop down will only apply to the first column) but after it chooses an item the remaining text boxes should then populate with their prospective info.

Does that make sence?
 
Is this what you want?

For the row source of the combo box, select all of the fields you want to autopopulate. Then in the onchange event, paste this code.

Me!textbox1 = Me!comboboxname.Column(1)

Do this for as many text boxes you have that you want autopopulated, making sure that you enter the correct names for each, and that the column from that combo box is the correct data you want for that text box, does this make sense?

Let me know if this works, if you continue to have trouble, I can give a sample database.
 
well Unfortunatly no this didn't work. but I'm sure that this is because of how I desribed the problem...

I have a small database 6 Columns 23 rows the forst column has only 5 different entries so there are duplicates. I would like these 5 different entries to apear in a drop down list on my form. then when one of those entries is selected a second dropdown for column 2 will be selected and then after that the remaining text boxes (4) will be populated. please let me know if this is a bad way to do this. I have the form all set up nad using the scroll abrs on the bottom I can scroll through all the records but i need to be able to select individual records bsed on the first two columns

Thanks for any help
 
Your best option is to have 2 related tables, One with the 5 different records, and the other with the rest of the data
Then base your form on a query of the 2 tables.
The Att may help.


Also... cut and paste the following into a word document for future reference. Explains what I'm on about:)

Auto Fill

Take any two tables related by a one-to-many relationship. Create a query that includes ONLY the related field from the "many" table and ALL of the "one" table's fields EXCEPT the related field.

Run the query, and then make a valid entry into the "many" table's related field, and the rest of the fields should fill in.

If it works... and it should... save the query, then create a form using the query plus whatever other fields you need.


HTH
Dave
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom