Hello,
First time post and newbie to Access.
I have a number of IDs as well as a start and end dates and times for that ID. On another table I have raw data with times and dates. On the second table, I want to list the ID beside each raw data point if the raw data points date and time falls between any of the IDs present. However, the dates and times are in two separate fields as they are imported from our data collection tool comma-delimited. I can't figure out the expression to solve this. However in excel, I would write something like:
if(and(IDStartDate<RawDataDate<IDEndDate , IDStartTime<RawDataTime<IDEndTime), ID, "No ID")
However, when I write the following Iif Statement, it doesn't work:
IIf([Block Dates]![Block Start Date]<[Date]<[Block Dates]![Block End Date],[Block Dates]![BlockID],"No ID")
Even this doesn't work:
IIf(Date( [Block Dates]![Block Start Date]) < Date([Date]) < Date([Block Dates]![Block End Time]), [Block Dates]![BlockID], "NO ID")
In addition, this only deals with the Date values and I also need to account for Time. Time is also screwed up because when it enters into the system it picks an random date to go along with it, so I just want it pointing to the time value.
Let me know. Thank you.