Auto populate after initial entry

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

Guest

I have a field in my form called "audited by" that is restricted to 3 characters (initials). After the auditor does the initial entry for the first record, I want their initials to autopopulate so to speak so they don't have to type it every time for every new record. I haven't been able to find out how to do this and don't know much about VB or SQL enough to find out how to do do this

Thanks
 
I would suggest to store the initials in the form-level variable. You
can declare it in VBA editor, into which you get by going to Events tab
on your form's Design view, selecting [Event procedure] in the Form
AfterUpdate event and clicking on the [...] button next to the [Event procedure].
At the top of the form's VBA module (the window you were just taken to),
you may see some declaratios such as Option Explicit. Right below it, type

Dim StoredInitials as String

Go back into the AfterUpdate event and type

StoredInitials = Me.>put text box name here into which the initials are entered<

Now, create (you may already have it) the Current event of the form and
type into it:

IF Me.NewRecord THEN Me.>put text box name here into which the initials
are entered< = StoredInitials

Hope this helps,
Pavel
 
Back
Top