DLookUp problem on Text Fields

  • Thread starter Scott Black via AccessMonster.com
  • Start date
S

Scott Black via AccessMonster.com

I am trying to look up the SSN of an Employee from the Dependent screen
(form) where the employeefrm and Dependentfrm are linked (filtered) by the
SSN of the employee.

SSN is the field used on the Employee form. Yet on the Dependent form I
have the field named EESSN and would like to populate that with the linked
SSN.

I have used the code below with no luck yet.

=DLookUp("[SSN]","Employees","[SSN]='" & Forms!Employees!SSN & "'")

I understand my naming may be confusing due to using the same names and can
change this if it will help.

I get an error "An invalid use of the .(dot) or ! or invalid parenthesis."


Thanks,
Scott
 
S

Scott Black via AccessMonster.com

I corrected an obvious error.

Codes is now:

=DLookUp("[SSN]","Employees","[SSN]='" & Forms!Employeesfrm!SSN & "'")

And of course it works.

I guess I needed to read it on here to get it.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top