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

Dlookup values in form not saved in table

P: 8
I have a form, Master List Temp, in Access 2003 that uses the Dlookup command to pull values from another table, Address Master. The user types in a person's home phone number in the HomePhone field on the form and the command looks up information in the Address Master table pertaining to the First Name, Last Name, etc. that match the HomePhone number criteria This allows the user to see if information for the account already exists.

The Control Source property for the FirstName field in the "Master List Temp" form follows:
Expand|Select|Wrap|Line Numbers
  1. =DLookUp("[FirstName]","Address Master","[HomePhone] =  [Form]![HomePhone]")
I have two questions.

1. When I leave the "HomePhone" number field on the "Master List Temp" form the only way the other fields that have the Dlookup command as the Control Source to show the lookup data is after I press the F9 key. Isn't there a way I can automate this so that as soon as I tab pass the "HomePhone" number control the other Dlookup fields update?

2. When I exit the "Master List Temp" form, the values that received information via the Dlookup command are not found in the "Master List" table on which the form is based. Information in fields that did not use the Dlookup command for the control source are found in the table. What should I do?


Nov 8 '07 #1
Share this Question
Share on Google+
5 Replies

Expert Mod 15k+
P: 31,494
  1. Expand|Select|Wrap|Line Numbers
    1. Call Me.Requery
    after the field has been updated.
  2. Any fields that are required to store their data into the underlying recordsource need to be bound.
Nov 9 '07 #2

P: 3
I run an update query when exiting the Form and it writes to the tables
Oct 25 '11 #3

Expert Mod 15k+
P: 31,494
I can't imagine that ever being required in a properly designed form Paul. You may want to reconsider how you do things.
Oct 25 '11 #4

P: 3
I sure have tried but the users need a "View" to see what was entered in the past and also an entry from for new information. So when a new record is entered in the "entry" form all the fields are populated in the tables on Exit. This history is retained for "Viewing" later. That's just the way our business works. Thanks
Oct 26 '11 #5

Expert Mod 15k+
P: 31,494
If you're writing to tables other than those included in the record source of the form then my last comment doesn't apply. It was only about those who design unbound forms then apply the data to the table(s) separately using SQL (or any other approach).
Oct 26 '11 #6

Post your reply

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