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

SQL Question

Status
Not open for further replies.

kathyc20

Programmer
Mar 7, 2001
96
CA
I have a form whose recordsource is set to
"Employee Details".

The Employee Details table contains employee information including the fields "Active" and "Employee Number" which is a primary key.

On this form I have a "View Mode" button that allows the user to view either all active or inactive records based on whether the "Active" field is set to true or false. I have written this query and it works.

My problem is that I have another button which calls up a form whose recordsource is set to "Employee Info". This table contains a primary key field called "Employee Number"

How do I write a query that displays only the records in my 2nd form Employee Info to match the records in the main table Employee Details.

Any help would be appreciated.



 
You can pass the recordsource as a SQL string to the 2nd form as part of the OpenForm statement, using the OpenArgs argument.
In 2nd form, in its Open event, set the recordsource to me.openargs


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top