Defaulting values in access subform ?

I have access subform. This has 8 fields. I want all fields to default to something if first field is selected to be "X1". If any other value is selected in first field no default should happen.

Is this possible. Note first field value is only on the form, its not saved in database yet.
Who is Participating?
pdebaetsConnect With a Mentor Commented:
Try something like this in the AfterUpdate event procedure of the control that holds X1:

if MyControlName = "X1" then
   MyField1 = "Some defalult Value"
   MyField2 = "Some default Value"
   MyField8 = "Some default value"
End If

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.