Automatically update a text field when any entry changed

  • Thread starter Thread starter RitchieJHicks
  • Start date Start date
R

RitchieJHicks

Hi,

I have 2 fields, 'Record Type' and 'Record Status' that I would like to
automatically update to 'Pending' (in the Record Type field) and 'A' (in the
Record Status field), whenever any field in the form is altered. I am a
complete novice at coding.

Can anyone suggest an easy way to automatically update those fields whenver
a value is changed?
 
RitchieJHicks said:
Hi,

I have 2 fields, 'Record Type' and 'Record Status' that I would like to
automatically update to 'Pending' (in the Record Type field) and 'A' (in
the
Record Status field), whenever any field in the form is altered. I am a
complete novice at coding.

Can anyone suggest an easy way to automatically update those fields
whenver
a value is changed?

I think you need to tell us what process you're trying to model because the
solution you describe is going to be unreliable - once a user updates a
record you're going to populate those fields, but what happens when it's
modified again? What happens if the record is modified by accident? The
permutations of things to go wrong could be endless!

You could give it a try by putting some code like this in your form's Before
Update event:

Me.txtRecordType = "Pending"
Me.txtRecordStatus = "A"

One other method might be to have a combo box with two columns, one for each
data element. Doing that you would only need to store one piece of data.

Keith.
www.keithwilby.co.uk
 
In the Before Update property of the form, setvalue of [Record Type] to
"Pending" and setvalue of [Record Status] to "A".
 
Thank you - can you explained how the code would look, please?

Thanks,
Ritchie.

--
-----------------------


slickdock said:
In the Before Update property of the form, setvalue of [Record Type] to
"Pending" and setvalue of [Record Status] to "A".

RitchieJHicks said:
Hi,

I have 2 fields, 'Record Type' and 'Record Status' that I would like to
automatically update to 'Pending' (in the Record Type field) and 'A' (in the
Record Status field), whenever any field in the form is altered. I am a
complete novice at coding.

Can anyone suggest an easy way to automatically update those fields whenver
a value is changed?
 
Back
Top