This happens to me all the time! Your DLookup has invalid syntax.
Not sure what your field names are and all, but try this:
Code:
vSeries = Nz(DLookup("[PumpType]", "[Test Stand Data]", "[SerialNumber]=" Me.SN), 0)
vMfgDate = Nz(DLookup("[Date]", "[Test Stand Data]", "[SerialNumber]=" & Me.SN), 0)
Note the brackets [] around the table name. That may be the only problem.
If [SerialNumber] is a Text field, use:
Code:
vSeries = Nz(DLookup("[PumpType]", "[Test Stand Data]", "[SerialNumber]='" Me.SN & "'"), 0)
vMfgDate = Nz(DLookup("[Date]", "[Test Stand Data]", "[SerialNumber]='" & Me.SN & "'"), 0)
Also, since Date is a reserved word in VBA, I would rename the field [Date] in your table. And make sure you are using correct field names. And for future reference you should, wherever possible, avoid spaces in the name of any object. If [Test Stand Data] didn't have spaces you may not have had an error... and I wouldn't be writing this and admonishing you for your naming conventions. :D
Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org