Using One Field To Up-Date Another

G

Guest

I have a form frmNewMembers and I record member’s first names in a field
FirstNames which I would like to copy into the next field PreferedName making
it easier to edit than type in the entire name.
I have no idea how to go about this as I have tried this in the Default
Value and doing a requery on exit of FirstNames field but no luck;
=[Forms]![frmNewMembers]![FirstNames]

Thanks any help appreciated.

Nick
 
M

Marshall Barton

Nick said:
I have a form frmNewMembers and I record member’s first names in a field
FirstNames which I would like to copy into the next field PreferedName making
it easier to edit than type in the entire name.
I have no idea how to go about this as I have tried this in the Default
Value and doing a requery on exit of FirstNames field but no luck;
=[Forms]![frmNewMembers]![FirstNames]


The default value property is used only when a new record
first becomes dirty (generally the first keystroke), so
that's too late to be effective on the same record.

You can use some code in the firstname text box's
AfterUpdate event:

If IsNull(Me.txtFirstName) Then
Me.txtPreferredName = Me.txtFirstName
End If
 
G

Guest

Excellent this work well, thankyou very much

Marshall Barton said:
Nick said:
I have a form frmNewMembers and I record member’s first names in a field
FirstNames which I would like to copy into the next field PreferedName making
it easier to edit than type in the entire name.
I have no idea how to go about this as I have tried this in the Default
Value and doing a requery on exit of FirstNames field but no luck;
=[Forms]![frmNewMembers]![FirstNames]


The default value property is used only when a new record
first becomes dirty (generally the first keystroke), so
that's too late to be effective on the same record.

You can use some code in the firstname text box's
AfterUpdate event:

If IsNull(Me.txtFirstName) Then
Me.txtPreferredName = Me.txtFirstName
End If
 

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