Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting just the AM or PM times in a report field 1

Status
Not open for further replies.

ImStuk

Technical User
Feb 20, 2003
62
US
The data come from a many part of a table. It is route stop times. Most have 1 AM Stop time and 1 PM Stop Time. Some have only 1 stop Time in the AM or PM. I am making labels and want both times in the same row. Right now I do the following, but I don't know how to add the WHERE part to this to make it show AM and PM. And how it can handle a null when there is no AM or no PM Stop Time. Hope I make sense.

=Format(Trim([qry_MessengerLabels.StopTime]),"Medium Time")
 
How about something like:
SELECT Trim(Format(nz([qry_MessengerLabels]![StopAM]),"Medium Time") & " " & Format(nz([qry_MessengerLabels]![StopPM]),"Medium Time")) AS BothTimes
FROM qry_MessengerLabels;

Code: Where the vision is often rudely introduced to reality!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top