combo default value not updating textbox

Voodoo223

Registered User.
Local time
Today, 02:35
Joined
Jun 16, 2005
Messages
16
I have a combobox that autofills a textbox that is working properly using AfterUpdate, based of a users table with username, firstname, lastname, location.
The cboUsername will autofill txtLocation when I choose a user.

The problem that i am having is that I have the default value of cboUserName set to =fOSUserName() and the DataEntry person needs to click on cboUserName to get it to update txtLocation.

I would like to have both of these fields hidden on the form and just have people see/fill out nessessary info for records (this is historical info, the users' locations can change over time)

How would I have the default value of cboUserName autofill txtLocation with no user interaction (on that part of the form)?

This is a new creation, so something in a different direction would be fine.
 
If you want this for any new records, you can put this in the form's On Current Event:

Code:
If Me.NewRecord Then
  cbo_UserName_AfterUpdate
End If

And that should run the combo's afterupdate event when it changes to a new record.
 
Beautiful, worked like a charm. Thank you.
 

Users who are viewing this thread

Back
Top Bottom