B
Barry A&P
I am using Dlookup to get a records key value then i am using 4 seperate
Dlookups with that key value to do some math in VBA and its killing me. here
are my lookups
InstallID = DLookup("[installID]", "T_installhistory", "TRKID = " &
Me![TRKIDCombo] & " AND RemovalDate = #" & RmvDate & "#")
InstallTSN = Nz(DLookup("[installTSN]", "T_installhistory", "installID = " &
InstallID), "UNK")
InstallTSO = Nz(DLookup("[InstallTSO]", "T_installhistory", "installID = " &
InstallID), "UNK")
RemovalParentTT = Nz(DLookup("[RemovalParentTT]", "T_installhistory",
"installID = " & InstallID), "UNK")
InstallparentTT = Nz(DLookup("[InstallParentTT]", "T_installhistory",
"installID = " & InstallID), "UNK")
ParentTRKID = Nz(DLookup("[ParentTRKID]", "T_installhistory", "installID = "
& InstallID), "UNK")
Me!RemovedFrom = Nz(DLookup("[SerialNumber]", "T_Serialnumbers", "TRKID = "
& ParentTRKID), "UNK")
Is there a more efficient way to get these values into the code? with an
array? or something as they are all from the same record in the same table..
Thanks
Barry
Dlookups with that key value to do some math in VBA and its killing me. here
are my lookups
InstallID = DLookup("[installID]", "T_installhistory", "TRKID = " &
Me![TRKIDCombo] & " AND RemovalDate = #" & RmvDate & "#")
InstallTSN = Nz(DLookup("[installTSN]", "T_installhistory", "installID = " &
InstallID), "UNK")
InstallTSO = Nz(DLookup("[InstallTSO]", "T_installhistory", "installID = " &
InstallID), "UNK")
RemovalParentTT = Nz(DLookup("[RemovalParentTT]", "T_installhistory",
"installID = " & InstallID), "UNK")
InstallparentTT = Nz(DLookup("[InstallParentTT]", "T_installhistory",
"installID = " & InstallID), "UNK")
ParentTRKID = Nz(DLookup("[ParentTRKID]", "T_installhistory", "installID = "
& InstallID), "UNK")
Me!RemovedFrom = Nz(DLookup("[SerialNumber]", "T_Serialnumbers", "TRKID = "
& ParentTRKID), "UNK")
Is there a more efficient way to get these values into the code? with an
array? or something as they are all from the same record in the same table..
Thanks
Barry