J
joer
Hi,
I have two date/time fields: StartTime and LastActivity.
In the History table, there are Location and LastActivity fields.
I want to run a query which finds the LastActivity date/time closest to
the StartTime and return the Location. In summary, I want to return
the location of a part at the specified StartTime.
The code I'm using in the calculated field is below which returns a
#Error message in the StartLoc column.
StartLoc:
DLookUp([HISTORY]![LOCATION],[HISTORY]![LOCATION],"[HISTORY]![LASTACTIVITY]="
&
DMax([HISTORY]![LASTACTIVITY],[HISTORY]![LASTACTIVITY],"[HISTORY]![LASTACTIVITY]<="
& [UserEntryData]![KitStartTime]))
I have the domain fields set to be
![Field] because when I set
them to just
, the query asks me for the parameter before it
runs. I think I need to add "#" in some places to specify date/time
but I'm not sure where they need to go. Thanks for any help.
Joe
I have two date/time fields: StartTime and LastActivity.
In the History table, there are Location and LastActivity fields.
I want to run a query which finds the LastActivity date/time closest to
the StartTime and return the Location. In summary, I want to return
the location of a part at the specified StartTime.
The code I'm using in the calculated field is below which returns a
#Error message in the StartLoc column.
StartLoc:
DLookUp([HISTORY]![LOCATION],[HISTORY]![LOCATION],"[HISTORY]![LASTACTIVITY]="
&
DMax([HISTORY]![LASTACTIVITY],[HISTORY]![LASTACTIVITY],"[HISTORY]![LASTACTIVITY]<="
& [UserEntryData]![KitStartTime]))
I have the domain fields set to be
them to just
runs. I think I need to add "#" in some places to specify date/time
but I'm not sure where they need to go. Thanks for any help.
Joe