fill in form boxes automatically

mojo67

New member
Local time
Today, 12:24
Joined
Jul 1, 2008
Messages
5
My brother-in-law has asked me to help with this problem. He has an Access database from which he wants to be able to have a form where the fields are blank until he enters a number in the first field, and then the remaining fields would automatically be filled in with the data in the database. For example if the first field is flight number and the remaining fields are From, To and Via he wants to be able to enter a flight number into the blank box and have the remaining blank boxes filled in automatically. Is it possible to do this? I have virtually no experience with Access so any help at all would be great.
 
Thanks for the quick reply, but could you expand on that please. How do I use dlookup. Also, how do I get the form to open up with the boxes blank

Thanks
 
Give some explanation of your form like what are the fields on form what are thw data types and about table on which it is based
also what field will be filled by you and what fields need to be filled automatically
 
I do not have the actual form , but the example he gave me is this. There is a table containing data in 4 fields Flight Number, From, To and Via. The form will have 4 text boxes. 1 each for Flight Number, From, To and Via. He wants to be able to have the boxes to start off blank, then when a flight number is inputted into the box, the remaining boxes will be filled in automatically.

I hope that helps to clarify things
 
Whether the form will be bound or un bound if bound, bound to which table
 
I have had results you are looking for by adding an unbound combobox to the form and in the wizard that follows select Find a record on my form then use the flight number field as a lookup. Then when you view your form in Form View either type in the flight number or use the down arrow to select a number and all the controls should show the correct data for that flight number. I hope this helps.
 
I have had results you are looking for by adding an unbound combobox to the form and in the wizard that follows select Find a record on my form then use the flight number field as a lookup. Then when you view your form in Form View either type in the flight number or use the down arrow to select a number and all the controls should show the correct data for that flight number. I hope this helps.

Thanks for that advice. That did the trick. I now have a new problem. I want the combobox list to be in alphabetical order, so I went to the properties sheet for the combobox and clicked on the ... for the Row Source to build a query. I selected the table, the flight number as the field to sort, selected ascending order and saved the query. Back in the properties sheet it shows SELECT flights2.Flight FROM flights2 ORDER BY flights2.Flight; as the Row Source. The problem is that when I go back to form view the combobox is empty.

Any help is appreciated

Got it sorted (no pun intended) now
 
Last edited:
When you say the combo box is empty are you say that you cannot select a flight number from the drop down?

I would dump the combobox and redo it. You used the correct procedure to sort so I don't know what the problem might be.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom