Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populate text-box 1

Status
Not open for further replies.

ajetrumpet

Technical User
Jun 11, 2007
97
US
I need to auto-populate a text box based on a 3-digit code typed into a text box next to it. Can I write an expression or build code to help with the task? I have about 20 different conditions bc/I have 20 different code numbers. The box to be populated already has a drop down value list associated with it.

-J

Ask a vague question, get a vague answer.
Be specific, and be respected.
 
Why not include the data for the textbox as an additional column in the combo? You can then set the Control Source of the textbox to, say:

[tt]=cboCombo.Column(1)[/tt]

Note that columns are numbered from zero.
 
I'm not sure how to go about it, this is not my DB and its pretty complex. The designer is nervous about any changes.

Clarify this please....
Why not include the data for the textbox as an additional column in the combo?
 
It is possible to set the rowsource of a combobox to a query, for example:

[tt]Select tp.ID,tp.SName,tp.FName,tc.Course From tp Inner Join tc On tp.CID=tc.CID[/tt]

These columns can then be refered to by using the Column property of the combo:

[tt]cboCombo.Column(0) 'ID
cboCombo.Column(3) 'Course[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top