Event procedure on selection (1 Viewer)

guinness

Registered User.
Local time
Today, 09:45
Joined
Mar 15, 2011
Messages
249
Can't quite get my head round how to write this but I know it can be done.

I have a form with a field called duration.
The user selects AM,PM or All Day from a list
If the user chooses All Day I want to create a duplicate record

DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdRecordsGoToNew
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdPaste


However I would like the duration in the first record to be AM and the Second record to be PM

So something like Iif [Duration], "All Day" run procedure
Else Iif do nothing.

Does that make sense?
 

jdraw

Super Moderator
Staff member
Local time
Today, 12:45
Joined
Jan 23, 2006
Messages
15,379
What exactly do you mean by "duplicate record"?
What do you plan on doing with Duration?
 

guinness

Registered User.
Local time
Today, 09:45
Joined
Mar 15, 2011
Messages
249
Hi JDRAW

Litteraly create an exact duplicate of the record that I have created so that I now have two records. One starting AM and one PM.

The duration says whether a person is on an activity for a full day, a morning or an afternoon which I need to know in order to schedule free time.

Hope that makes sense
 

Users who are viewing this thread

Top Bottom