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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default Value for Unbounded field

Status
Not open for further replies.

Jayson

Programmer
Jan 31, 2001
75
US
I have a bit of a problem with unbounded fields...

Here's the situation, i have a form, which is being run by an SQL statement RecordSource. This form displays all retrieve records onto predefined text/combo box. Each record is displayed section by section. For ex. for record 1, i have a text box which displays "ID1" and a combo box which displays "Type1", then on the next section which is right below it, i have another section which displays record 2, which has "ID2" and "Type2" etc...

Now, the problem is i need to have the combo box "Type" as UNBOUND, containing a 'Value List' of say A,B,C only. But somehow i also need to initialize the value (which could be A,B,or C)of this combo box to whats being retrieve from the SQL. It should also be changeable to A, or B or C.
And of course, each "Type" will have a distinct value for each section.

Any help will be appreciated!

 
I'm not sure I follow completely, but you can just assign a value to the combo box:
ComboBox1 = "C"
(Of course, you'd assign a variable instead of a literal.) As long as the value you assign is in the list, this will work, and will automatically select the correct list entry. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top