I'm trying to set up a query that shows whether or not a retailer is Open or Closed depending on the time input (TimeSelection). See below:
Status: IIf([OpenTime]<=[Forms]![frmMain]![TimeSelection] And [CloseTime]>[Forms]![frmMain]![TimeSelection],"Open","Closed")
This works just fine UNLESS the OpenTime and CloseTime are both AM. For instance, one retailer is open from 11am-2am. This displays "Closed," even if the TimeSelection is between the two (3pm, for instance).
What can I do to fix this? I tried using Short Time and using a "Between" statement, but neither worked. Help!!!
Status: IIf([OpenTime]<=[Forms]![frmMain]![TimeSelection] And [CloseTime]>[Forms]![frmMain]![TimeSelection],"Open","Closed")
This works just fine UNLESS the OpenTime and CloseTime are both AM. For instance, one retailer is open from 11am-2am. This displays "Closed," even if the TimeSelection is between the two (3pm, for instance).
What can I do to fix this? I tried using Short Time and using a "Between" statement, but neither worked. Help!!!