if 1stname is a text field try
DoCmd.OpenReport stDocName, acPreview, , "[empname]=" & "'"& Me.lstName & "'"
Hope this works.
If the code is working on one machine and not the other, then you may have your ODBC drivers setup differently in you control panel on the computers. Check all the information for the ODBC drivers on the computer that works and verify the same setup on the one that is not working.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.