G
Guest
I am trying to make it so that when i push a button it opens a report and
executes this update.
1.
DoCmd.RunSQL "UPDATE Run SET Print_Date = Date(), Print_Time = Time() WHERE
Type = 'PAPS' AND ID = MAX(ID); "
2.
DoCmd.RunSQL "UPDATE Run SET Print_Date = Date(), Print_Time = Time() WHERE
TYPE = 'PAPS' AND Print_Date = ' '; "
Now I am getting a couple Errors
1. "Cannot have aggregate function in WHERE clause (ID=Max(ID))."
2. "Data Type Mismatch in criteria expression"
Can someone see what it is that is not functioning properly
thanks in advance
Herhsal
executes this update.
1.
DoCmd.RunSQL "UPDATE Run SET Print_Date = Date(), Print_Time = Time() WHERE
Type = 'PAPS' AND ID = MAX(ID); "
2.
DoCmd.RunSQL "UPDATE Run SET Print_Date = Date(), Print_Time = Time() WHERE
TYPE = 'PAPS' AND Print_Date = ' '; "
Now I am getting a couple Errors
1. "Cannot have aggregate function in WHERE clause (ID=Max(ID))."
2. "Data Type Mismatch in criteria expression"
Can someone see what it is that is not functioning properly
thanks in advance
Herhsal