I have a form called frmservices which has two boxes. The lookup box contains social security number. The second box contains the name. When a social security number is selected, I want the name box to be populated with the corresponding name. On the control source of the name box, I have the following Dlookup statement.
=DLookup("[Name]", "tblelders", "[ssnumber]= Form![ssnumber]"
where name is coming from the table tblelders. SSNUMBER is the primary key in the table and also listed in the table tblservices which is the record source for this form I am working with.
The lookup is working, but only after you close the database or go back two records. When social security number is selected, the name box remains unpopulated, however, backtrack not one but two records, and the name field will populate on the current record and remain populated from then on. Then all this starts over with a new record. What have I done wrong?
=DLookup("[Name]", "tblelders", "[ssnumber]= Form![ssnumber]"
where name is coming from the table tblelders. SSNUMBER is the primary key in the table and also listed in the table tblservices which is the record source for this form I am working with.
The lookup is working, but only after you close the database or go back two records. When social security number is selected, the name box remains unpopulated, however, backtrack not one but two records, and the name field will populate on the current record and remain populated from then on. Then all this starts over with a new record. What have I done wrong?