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

row source picking 1

Status
Not open for further replies.

Cunningham

Technical User
Jul 20, 2004
3
US
I have a table created and am in the process of putting a form together. However, there is one field in this table that I want to limit the choices. For the table I set the row source option to only accept "x" choices.

However each one of these choices is pretty lengthy (20+ characters). Is there a way to create a list (another table?) with the selection choices and have the form pick from this, rather than having an exceedingly long list of < "Option 1...";"Option 2...";"Option 3..." >

Perhaps I'm looking at this wrong, or possibly confusing someone here, but since I'm the only one who's ever used Access, I got nominated to figure this one out. I appreciate any insights.

regards,
C
 
Create a table with one field to list your options.

On your form, set the rowsource of the Combo Box to the table that has all of the options listed.

The combo box will only show the options stated in that table. In the properties for the combo box you need to set Limit to List = Yes (this will only allow you to select items in the combo box list)

 
Hi, folks. Thanks for the replies.
I neglected to mention that but yes, I do have a combo box.
CodeMonkey – I think your second paragraph was what I was looking for (and I did have the limit to list set). I appreciate it. I will give it a try.


C
 
Well, that worked. Interesting. Next question.

On this form, I have two combo boxes for identifying reports, one where we enter the name and the other a number. These two are always the same each month (e.g. each month we get report named "PD_Claim," number "PD-301.")

I have a separate table setup with that has a field for name and number that the combo box pulls values from. Both combo boxes are set to limit entries to the values entered in this table.

Here's my scenario: I enter the name/number of the report. Is there a way for the other field to have the corresponding (and correct) other field automatically entered? Sort of a "match up," so to speak...?

Thanks again.
C
 
C,
Why not have the name and number in the same field?

or

have 3 tables with 2 fields in each:

tblA(lngNameID,strName)
tblB(lngCodeID,strCode)
tblAintersectB(lngNameID,lngCodeID)

Make a query based on these 3 with natural joins and include strName and strCode.

This way you can query the centre table to extract all possible combinations of Name:Code

Add limit to list etc for the combo box and bob's your uncle.

You can also add more fields to this kind of set up in order to impose selection and validity rules.

Hope that helps.

Troy
Who is himself overdue with the POS application :S
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top