Combo Box value based on Text Box Value

  • Thread starter Thread starter sunilkes
  • Start date Start date
S

sunilkes

Hi

I am trying to get this right

I have a text box that shows the user name by calling a function, I
want this to be displayed on a combo box, and am not getting it

Please help

Cheers
Sunny
 
Sunilkes,

We'll need more detail about the RowSource of your combo box to be sure, but
it's possible that the combo box' *value*, as determined by which column is
the BoundColumn, is a numeric value, not text like the username. In this
case, the text from your Textbox would not match any values of the RowSource
of the combo box.

If this is the case, you can set the value of the combo box using the
DLookup() function:

Me![YourCBx] = DLookup("[UserID]", "Users", "[UserName] = " & Me![YourTBx])

If the first ColumnWidth is set to 0", and the UserName is the 2nd column in
the RowSource, the combo box will then display the Username.

Hope that helps. If not, post more detail on your combo box' RowSource,
BoundColumn, ColumnWidths, and ControlSource properties.

Sprinks
 
Back
Top