Hello,
I have two tables. One is Agents, with fields AgentName (text) and ExpirationDate (date/time). The other table is Hours, with fields AgentName (linked to Agents), HoursDate (date/time), and HoursNumber (number).
I have a data entry form for the Hours table, and I have a Save Record button on it, and when the user clicks the Save Record button, I want it to check to see whether the HoursDate is before or after the ExpirationDate linked to that same agent and take action accordingly.
I'm using a macro to do this but I am open to VB if that would be easier.
I tried If Agents![ExpirationDate] > [HoursDate] Then blahblah but that popped up syntax error. Then I tried If [HoursDate]-Agents![ExpirationDate] > 0 Then blahblah but that also gave me syntax error.
I am sure I am missing something obvious here. Please help!