By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,489 Members | 1,954 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,489 IT Pros & Developers. It's quick & easy.

Populate List Box Based on Values

P: 65
Hello,

I am making a list box that has several columns.One of the columns is based on the value in a field. If the value of the field for the record is "1" I want it to say "Manager." If the Value is "2" I want it to say "Employee". I figure it would be easy to use an If ... = 1 then ... = "Manager" but am not sure where to put this code to modify column values.

Thanks for your help, I will gladly clarify if I was not clear in any area.
Jan 3 '07 #1
Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,186
Is the field you refer to in the bound recordset of the form?
Jan 3 '07 #2

P: 65
Is the field you refer to in the bound recordset of the form?
No, it is an unbound form. The form has list boxes and drop-down boxes used for selecting the correct record to modify on a seperate form. Having a descriptive attribute rather than "1" is is helpful to the user.
Jan 3 '07 #3

NeoPa
Expert Mod 15k+
P: 31,186
I think I understand you.
You can populate the ListBox either with values from a Table/Query or from a list you enter manually.
1. To populate from Table/Query.
Set Row Source Type to Table/Query and
Row Source to the name of the Table or QueryDef or some SQL.
2. To populate from a manual list.
Set Row Source Type to Value List and
Row Source to a list of items separated by semi-colons ( ; ).
Jan 3 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.