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

Basic table lookup in Access 2000 combo boxes

P: n/a
Anybody?
This is probably a very simple question.
I am just testing this on my own. I have 2 tables:

Table name:fields
Employer: Employer Number (primary key), Employer Name
Employee: SIN, Name, Employer Number

I have related Employer Number in the relationship area for both
tables.

I then created a forum and it has the employee information. I now
want the employer name to appear as read only when I type in the SIN
of the employee. I created a read only combo box and typed into the
"row source" area of the properties :

- SELECT Employer.[Employer Name] FROM Employer;

- But this only gives me a drop down list of the Employers and it
doesn't automatically update the employers depending on the SIN of the
Employee I type in.

Anyway, this all works when I use the wizard but I was wondering why
it didn't work when I tried to do it manually using SELECT commands in
SQL?????

Special Alien thanks to anyone out there!!
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Open your form in design view.
Right-click the combo and choose Properties.
Set these properties for your combo:
Column Count 2
Column Widths 0
Bound Column 1
Control Source Employee Number
RowSource SELECT Employer.[Employee Number], Employer.[Employer
Name] FROM Employer;

The combo now has 2 columns. The first column is the bound column, so it
stores the Employee Number. However, this column is zero-width, so it
displays the employee name.

The bit I wasn't sure about was why aliens are interested the sins of
employees? Maybe there is a judgement day. :-)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Alienz" <ks*****@yahoo.com> wrote in message
news:58**************************@posting.google.c om...
Anybody?
This is probably a very simple question.
I am just testing this on my own. I have 2 tables:

Table name:fields
Employer: Employer Number (primary key), Employer Name
Employee: SIN, Name, Employer Number

I have related Employer Number in the relationship area for both
tables.

I then created a forum and it has the employee information. I now
want the employer name to appear as read only when I type in the SIN
of the employee. I created a read only combo box and typed into the
"row source" area of the properties :

- SELECT Employer.[Employer Name] FROM Employer;

- But this only gives me a drop down list of the Employers and it
doesn't automatically update the employers depending on the SIN of the
Employee I type in.

Anyway, this all works when I use the wizard but I was wondering why
it didn't work when I tried to do it manually using SELECT commands in
SQL?????

Special Alien thanks to anyone out there!!

Nov 12 '05 #2

P: n/a
A huge alien high 3 out to you!!! I have accomplished the task that has
taken my alien mind on quite a journey. I am just trying to understand
the concepts of SIN and Employer and I think it is quite interesting how
every human is assigned a separate one of each. I must stop typing now
as I have slimed up my keyboard.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

P: n/a
Yes, yes, look at all of these sinful employees appear before my eyes!
Unfortunately, I'm a friendly alien and I will do no harm :(

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.