Too many forms?

E

E.Q.

I have a filtered form created by the forms wizard; the filtering comes from
an unbound form used to simply select an employee. The form is designed to
enter data into tblCertification with fields:
lngCertID
chrIssuedID
chrEmpID (the employee number)
chrCertificate
....
The filter is on chrEmpID.
I have a combo box to display an employee name instead of their employee
number. In order to enter a new certificate for a selected employee I needed
to add [forms].[frmEmployeeSelect].[chrEmpID] to the querry populating the
combo box. This works well.
I liked the form enough to also want it for a continuous view for all
employee certificates. I created a second form by removing the restriction
in the combo box query and clearing out the filter itself in the form
properties.
Question: is there a way to only have one form with the filtering and querry
restrictions coming on if selected by the frmEmploeeSelect form but having
filtering or the querry restriciton if opened with annother command button
control from the switchboard?
 
A

Arvin Meyer [MVP]

Sure, you can apply different filters from different buttons, or change the
criteria for the same filter.
 
M

Marie-Louise Spinoy

Arvin Meyer said:
Sure, you can apply different filters from different buttons, or change
the criteria for the same filter.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


E.Q. said:
I have a filtered form created by the forms wizard; the filtering comes
from
an unbound form used to simply select an employee. The form is designed
to
enter data into tblCertification with fields:
lngCertID
chrIssuedID
chrEmpID (the employee number)
chrCertificate
...
The filter is on chrEmpID.
I have a combo box to display an employee name instead of their employee
number. In order to enter a new certificate for a selected employee I
needed
to add [forms].[frmEmployeeSelect].[chrEmpID] to the querry populating
the
combo box. This works well.
I liked the form enough to also want it for a continuous view for all
employee certificates. I created a second form by removing the
restriction
in the combo box query and clearing out the filter itself in the form
properties.
Question: is there a way to only have one form with the filtering and
querry
restrictions coming on if selected by the frmEmploeeSelect form but
having
filtering or the querry restriciton if opened with annother command
button
control from the switchboard?
 
E

E.Q.

(Glad to see this site back up... I hadn't seen my post for a couple days;
I've been wondering)

I can handle the filter OK; what I have trouble with is the query for the
combo box used to display employee names. I currently have two copies of the
form, one without the filters has a combo box set up with the following qry
for row source

SELECT tblEmployee.chrEmpID, [chrFName] & " " & [chrLname] AS expFullName
FROM tblEmployee;

The only difference for the form with the filters is the query for the cbo
for the single employee box

SELECT tblEmployee.chrEmpID, [chrFName] & " " & [chrLname] AS expFullName
FROM tblEmployee
WHERE (((tblEmployee.chrEmpID)=[forms].[frmemployeeselect].[chrempID]));

so the question is what to do with the code behind the two buttons to put
the right query as the row source for the combo box (cboEmpID)?

I want to restrict data entry to the selected employee when viewed via a
"select one employee" button.
Peace

EQC


:

Sure, you can apply different filters from different buttons, or change the
criteria for the same filter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top