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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top