C
Christine
VERY new user here, completely lost!
In FormA I present an Option Group whereby a user can
choose to display records in a table called CARs for a
particular EmployeeID or by a particular ProcessID. If
the user selects the option for Employee, the EmployeeID
Combo Box is enabled. If the user selects Process, the
ProcessID Combo Box is enabled. After making their
selection, they click Search Records (cmdSearchRecords).
The screen looks something like this:
Select your search critiera: (Option Group Choice)
[] Employee (EmployeeID Combo Box)
[] Process (ProcessID Combo Box)
Search Records (cmdSearchRecords)
The row sources for the Combo Boxes are based on queries:
Row Source for Process: SELECT ProcessQuery.CARs_Process,
ProcessQuery.Processes_Process FROM ProcessQuery;
SELECT CAREmployees.OriginatorID, CAREmployees.FullName
FROM CAREmployees;
The action of enabling and disabling the checkboxes in
the Option Group works fine, as do the Combo Boxes.
Below the search criteria screen information, on the same
FormA in the detail section, I have a subform
(subfrmSearchResults), in which I want to display all the
records that meet the user's search criteria. The records
will change as the user alters their choices. The
information in the subform is currently based on a query
(shown below) and displays in datasheet view.
SELECT CARReview.CARNum, CARReview.CreateDate,
CARReview.CARType, CARReview.FullName, CARReview.Process,
CARReview.Source, CARReview.Problem,
CARReview.CARApproveStatus FROM CARReview;
The problem is that I don't know what procedure to put
into cmdSearchRecords. I suspect it has something to do
with a filter and/or a query with WHERE, and setting up
strings that can be changed on the fly, but have no idea
what to write nor where.
Can someone provide me with the code? Pretty basic stuff,
I know, but there are so many places to put code, and so
many possible commands to use I'm lost.
Many thanks,
Christine
In FormA I present an Option Group whereby a user can
choose to display records in a table called CARs for a
particular EmployeeID or by a particular ProcessID. If
the user selects the option for Employee, the EmployeeID
Combo Box is enabled. If the user selects Process, the
ProcessID Combo Box is enabled. After making their
selection, they click Search Records (cmdSearchRecords).
The screen looks something like this:
Select your search critiera: (Option Group Choice)
[] Employee (EmployeeID Combo Box)
[] Process (ProcessID Combo Box)
Search Records (cmdSearchRecords)
The row sources for the Combo Boxes are based on queries:
Row Source for Process: SELECT ProcessQuery.CARs_Process,
ProcessQuery.Processes_Process FROM ProcessQuery;
SELECT CAREmployees.OriginatorID, CAREmployees.FullName
FROM CAREmployees;
The action of enabling and disabling the checkboxes in
the Option Group works fine, as do the Combo Boxes.
Below the search criteria screen information, on the same
FormA in the detail section, I have a subform
(subfrmSearchResults), in which I want to display all the
records that meet the user's search criteria. The records
will change as the user alters their choices. The
information in the subform is currently based on a query
(shown below) and displays in datasheet view.
SELECT CARReview.CARNum, CARReview.CreateDate,
CARReview.CARType, CARReview.FullName, CARReview.Process,
CARReview.Source, CARReview.Problem,
CARReview.CARApproveStatus FROM CARReview;
The problem is that I don't know what procedure to put
into cmdSearchRecords. I suspect it has something to do
with a filter and/or a query with WHERE, and setting up
strings that can be changed on the fly, but have no idea
what to write nor where.
Can someone provide me with the code? Pretty basic stuff,
I know, but there are so many places to put code, and so
many possible commands to use I'm lost.
Many thanks,
Christine