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!

Using Table/Query better than Value list for recordsource? 2

Status
Not open for further replies.

naoaja

Technical User
Aug 27, 2004
48
US
Would there be a reason to not use a Value list for the data source for a list box? If I used a value list, I could add empty lines between some of the choices and make the list a little more reasonable to read (at least in my opinion) Also, I could add some spaces that I think could be trimmed if they were chosen.
For example:
If I entered the value list as "Scents";" Blackberry Sage";" Tomato Leaf";" Dragons Blood";" ";"Process".....it would give me:

Scents
Blackberry Sage
Tomato Leaf
Dragons Blood

Process
CP
CPOP

rather than just a long list on the left side. Is there a downside to doing it this way? For some reason in the back of my mind, I thought I remembered that I shouldn't do it that way.

thanks for your time
naoaja

 
You could probably do the same with SQL if you use some fancy expressions with a union query. I'm not sure I would do this since users could select nonsense values.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
A list box assumes you want a list not a drop down menu. As a result you are going to have to struggle to cope with users, as Duane points out, selecting "Process" or a blank line.

The general rule for value lists is they are faster than interrogating the database but need updating everytime the list changes.

 
Thanks for the input. I chose a list box so I could have the multiselect option. I tried it and if they chose a blank line with the others, when the choices get transferred to the field they are to go to, the field doesn't contain the blank line. I'll have to work and see if I can get it to trim the blank spaces though...

Thanks again
naoaja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top