Text Box

  • Thread starter Thread starter Froto
  • Start date Start date
F

Froto

On a Form I have a combo box which users use to select
their names (eg. Johnson, Bob). What a would like is to
have a ID box in top left corner that once the user
selects his name from the combo box, the above box in the
left corner would populate by automatically entering the
users first name inital and entire last name (Eg.
BJohnson)

Thank you for your help
 
Froto,

Use the following code in the AfterUpdate event for your combobox

Me.TextBoxName = Left(Me.ComboBoxName,1) & Me.ComboBoxName.Column(1)

This assumes that the bound column of the combobox is the first name and the
second column for the combobox is the surname.

HTH,

Neil.
 
-----Original Message-----
Froto,

Use the following code in the AfterUpdate event for your combobox

Me.TextBoxName = Left(Me.ComboBoxName,1) & Me.ComboBoxName.Column(1)

This assumes that the bound column of the combobox is the first name and the
second column for the combobox is the surname.

HTH,

Neil.

The difference on my side is my table has on field called
submitter which contains both first and last name of
user, how would I need to change the code to accomplish
the task.

Thank you for your response
 
Back
Top