By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,027 Members | 1,998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,027 IT Pros & Developers. It's quick & easy.

To Auto fill fields on a form

P: 1
I am using Access 97. I have a customer table including address. I want to create a reservation form that automatically inserts the appropriate address (from the customer table) once a customer has been selected. Please help
Oct 11 '06 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,418
The customer will be selectd from a combobox, so in your combo box as a second column you need to add the information for the adress

In your combo box as After Update you assign Event procedure


Remember to change the column count property in your combo box!

Best regards!
Oct 14 '06 #2

Expert Mod 10K+
P: 14,534
In the default value property of the control for the address put the following:

If the customer control on the form is an ID (Number)
DLookup("[AddressField]", "CustomerTable", "[CustomerField]=" & Me.CustomerControl

If the customer control on the form is text
DLookup("[AddressField]", "CustomerTable", "[CustomerField]='" & Me.CustomerControl & "'"
Oct 14 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.