Automatically update a text field when any entry changed

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?
 
K

Keith Wilby

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
 
S

slickdock

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

RitchieJHicks

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?
 

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