If Then ???

srburk

Registered User.
Local time
Today, 16:42
Joined
Dec 31, 2002
Messages
32
FIELD 1: Scheduled appointment time.
FIELD 2: Session (AM or PM)

I would like "FIELD 2" to populate itself with "AM" or "PM" if "FIELD 1" is at or before 12:00 noon.

Can anyone help me with this one?

Scott Burk
 
Scott:

Wht not just set the format of field one to be a Medium Date? Why have an additional field for AM or PM?
 
Our clinics are separated in schedule by AM sessions and PM sessions. I would like to be able to report on either AM session, PM session, or both.

When reporting, I would set the database to ask me "AM" or "PM".
 
FIELD 1 is a time format.
FIELD 2 can be a text format with AM or PM.
 
Assuming it is a Medium Time (i.e. 8:00 AM or 4:00 PM) do not set this in the form. In the query make an additonal field and add the following TimeText: Right([Timefield],2) in the criteria add [What time of day?]

If you need to do this in the form add the following to the AfterUpdate event of Field 1

me.field2 = Right([Field1],2)

make sure that the Format of field 1 is set to a Medium Time (8:00 AM, 12:00 PM, 3:00 AM, etc)

HTH
 

Users who are viewing this thread

Back
Top Bottom