Ofer Hi again. After this project - I quit!! Could you please look at this &
tell me what I'm doing wrong. The query opens, the filter works, but the
message box says the same thing, that xDeveloperName = 127 and xvaultNo = 0
Thanks An Advance
Wm
DoCmd.OpenQuery "qryBill"
DoCmd.ApplyFilter , "[Vault No] = " & [Forms]![FrmReleaseOffsite]![xVaultNo]
xDeveloperName = DLookup("DeveloperName", "qryBill")
Ofer Cohen said:
No, you don't need to specify the table name, unless the field you are
looking for is located on more then one table in the query, and they are both
list there as the output of the query.
--
Good Luck
BS"D
:
Ofer, Thank you for your help! The query has 4 related tables, do I have to
specify which table because The information it stores and the information I'm
looking at on the query differ
:
How many records return from the query?
If only one record is returned, you can use
xEmp = DLookUp("EmployeeId","QueryName")
If more then one record returns from the query, you need to add a filter to
the DlookUp using a value such a key field
xEmp = DLookUp("EmployeeId","QueryName","KeyField=" & KeyField)
--
Good Luck
BS"D
:
I have a query that filters out a record, there are fields I want to capture
in variables from the query. I Dim xEmp as string and after the query runs,
I say xEmp = EmployeeId where EmployeeId is a field in the query but I get
nothing. Can someone help me?
Thanks In Advance