Daniel-
You have two choices:
1) In the Current event of the form, dynamically change the Row Source of
the combo box to with filter for current employees and without filter for
prior employees. You can assign SQL to the Row Source or use the name of
two different queries.
2) Add the fields making up the display column to the query that's the
Record Source for the form. Overlay a Text Box displaying these fields on
top of the display portion of the combo box, and make sure the Tab Stop
property is set to No. This cannot be done if you have built your form
with a Wizard that has applied a Layout to all your controls - you would
have to remove the Layout first.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: daniel2478a <daniel2478a@yahoo.ca>
Reply-To: <MS_Access_Professionals@yahoogroups.com>
Date: Saturday, November 3, 2012 6:19 AM
To: <MS_Access_Professionals@yahoogroups.com>
Subject: [MS_AccessPros] employe list
Hello,
i have simple database that uses an employee table. on a form i have a
drop down to select an employee name, all works good
i added an employed column with yes/no option for the employee list so
only current employees show up on the drop down
i filter this with a query to make a list of only current employees
once an employee is not employed he/she is removed from the query and drop
down just like wanted, but problem is if i look at old forms it wont
display the old employee, (the index to the lookup table is there)
basically the drop down needs to display data from query, but once
selected the data needs to come from the table
how can i get this to work?
thanks,
d
------------------------------------
Yahoo! Groups Links
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar