Update field from value in another field

J

jim

I have a form attached to a table. In the table I have
two fileds whos' data type is yes/no. I have two
additonal fields that I need to populate once the yes/no
field has been checked.

example:

field:[ProcessStarted] field type: yes/no, if the user
selects yes then I want to auto poplulate another field
field:[ProcessStart Date] field type date; with the
current date. So if i'm working in my form view and I
check [ProcessStarted] "yes" then popoulate the
[PorcessStart Date] with the date: ex. 10/13/2003.

Do I need a module to do this?

thanks,
 
P

PC Datasheet

Put this code in the AfterUpdate event of the ProcessStarted field:

If IsNull(Me!ProcessStarted) Then
Me!ProcessStartDate = Date()
Else
Me!ProcessStartDate = Null
End If

You'll be able to check and uncheck the ProcessStarted field and the
ProcessStratDate field will be correct for which ever you do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top