Combine two forms into one

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to make a form that combines two form into one. Right now each
form is based on its own query. The first form lists each supervisor by
"Supervisor ID" and then the hours of those they supervise. The second forms
also lists each supervisor by "Supervisor ID" and then the employees how do
not receive wellness pay. I would like to combine the forms into a form that
lists each supervisor by "Supervisor ID" and then the hours of those they
supervise and then the employess who do not recieve wellness pay.

Right now:
Form 1:
Supervisor: 1
Employees:
2
3
Supervisor: 2 ...

Form 2
Supervisor: 1
Employess not receiving wellness pay:
2
4
Supervisor: 2 ...


Want:
Supervisor: 1
Employees:
2
3
Employess not receiving wellness pay:
2
4
Supervisor: 2 ...

Thank you.
 
Tandy,

Sounds like you need a Union query. Basically, take the SQL from your
two existing queries and copy them into a new query's SQL, adding the
UNION keyword in between, like so:

SQL1
UNION
SQL2;

Make this query the new recordsource for your combined form.

Notes:
* Only one ; is required at the end
* Add a EmplType field to both queries. Set it to 1 for regular
employees, 2 for non-wellness employees. You can sort by this field in
your form.
* Each query needs the same Field List. If the field lists don't match,
add dummy fields to each query to make them match. Example:

SELECT FieldA, " " AS FieldB FROM TableA
UNION
SELECT " " AS FieldA, FieldB FROM TableB;

Access Help has lots of info on UNION queries.

-Ken
 
Back
Top