Updating field called 'status'

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to have a field change from a default W to a U when any field in a
form has been changed. I have attached a Macro to the Form's After Update and
I have also tried this by assigning the Macro to each field. I am using a
simple GotoControl and Sendkeys macro.

This process is not smooth for the end user and I would also like to be able
to go to the next field in the Tab Order after the status field has been
changed.

Is there a better way to do this?
 
I would into using the Dirty or AfterUpdate Event to trigger code to Update
the Status control. something like

If Me.dirty=true then Me.Status="U"

Then you can use the SetFocus to move the cursor to whatever control you'd
like.

Me.NewControlName.Setfocus.
 
Daniel
Thanks for the reply.
I have been working your suggestion every way I can think of and I am just
not having any success. I am able to use the After Update to change the
Status field as required.
Here is my problem now. When applied to each field in the form (SubForm),
the Macro ran on every field change and took me back to the [Status] field
each time. When I applied it to the Form I can make changes in more than one
field and the the [Status] field does change to U but when I try to leave
the record, I cannot leave or get out of the [StartDate] field to go to
another Record. It makes no difference what field I have in the GotoControl,
results are the same.
Macro =
SetValue
Forms![Form1]![SubForm]![Status]
'U'
GotoControl
[StartDate]
 
Back
Top