I have 3 fields in an access form.
- Field 1 - is a text field pre-populated with some data. There are no null records
- Field 2 - is a text field pre-populated with some data. It can either have a value or be null.
- Field 3 - Is a text field. The user will enter information into the field.
There is a rule. If there is a null value in field 2, then field 3 will equal the value from field 1 and so I want it to automatically populate field 3 from field 1. if the value is not null, then the user will populate the field record manually.
I have set up a form load event to:
If Me.field2 = "" Then
Me.field3 = Me.field1
The problem I am having is, the user may want to change the pre-populated value of field 1 and if the corresponding field 2 record is blank, I want field 3 to be updated with the same value the user changed in field 1. I don't want to have to reload the form all the time for this update to occur. I've tried the above syntax in a After_Update event and a change event, but it's not updating.
Can anyone suggest what I am doing wrong?
Thanks, Mike
IsNull(Me.Field2.Value) or Me.Field2.Value=""
– Tim WilliamsIf Len(Me.Field2.Value) = 0 Then
– markblandfordLen(null)
return null ? Maybe:If Len(Nz([Me.Field2.Value],"")) = 0
– Tim Williams