N
NYCMoreOn
Hello folks - in a bit of a bind and looking for direction.
Here's what I have:
I have form with a subform; the form we'll call ResourceLookup (getting
records from ResourceQuery), subform we'll call ResourceSearch.
When opening the ResourceLookup form, the ResourceSearch is invisable
(hidden) and you can browse all of records of Resources (since there
are no parameters set in the ResourceQuery). When you press "Search
Resource" command button, the ResourceSearch subform becomes visible
where you are able to define your parameters in textboxes for your
search (i.e. employee ID, employee f_name, employee l_name, location,
etc).
First, I would like to take the parameters a user defines and pass them
through to the ResourceQuery, have the query requery based on those
parameters, have the ResourceSerarch form become invisible, and have
the results display in the ResourceLookup main form.
Ex.
You have 100 employees
You click "Search Employees"
the subform becomes visible
You define first name as "John" and Location as "California";
everything else you leave blank to include all
You click "Get Results"
subform becomes invisible
Main ResourceLookup form displays 1 of 9 records; Each with the first
name of "John" which live in California and you can now scroll through
each record.
Second, since we have now set parameters in the ResourceQuery. I am
thinking that when the user click on the "Search Resource" command
button there is a function in the SQL that clears the prior parameters,
does a me.requery, and makes the subform visible.
I have the form and subform built. I have the "Search Resource"
command button working that makes the subform visible/invisible. What
I don't have, code-wise, is the code to set the parameters in the
query, have the results show on the main form, and clear them out when
you go to search again.
whew....I understand the logic of it and I know it's possible.
However, I'm not savvy enough in SQL to make it happen.
Any hints, code snippets, or direction would be greatly appreciated.
Thanks.
Here's what I have:
I have form with a subform; the form we'll call ResourceLookup (getting
records from ResourceQuery), subform we'll call ResourceSearch.
When opening the ResourceLookup form, the ResourceSearch is invisable
(hidden) and you can browse all of records of Resources (since there
are no parameters set in the ResourceQuery). When you press "Search
Resource" command button, the ResourceSearch subform becomes visible
where you are able to define your parameters in textboxes for your
search (i.e. employee ID, employee f_name, employee l_name, location,
etc).
First, I would like to take the parameters a user defines and pass them
through to the ResourceQuery, have the query requery based on those
parameters, have the ResourceSerarch form become invisible, and have
the results display in the ResourceLookup main form.
Ex.
You have 100 employees
You click "Search Employees"
the subform becomes visible
You define first name as "John" and Location as "California";
everything else you leave blank to include all
You click "Get Results"
subform becomes invisible
Main ResourceLookup form displays 1 of 9 records; Each with the first
name of "John" which live in California and you can now scroll through
each record.
Second, since we have now set parameters in the ResourceQuery. I am
thinking that when the user click on the "Search Resource" command
button there is a function in the SQL that clears the prior parameters,
does a me.requery, and makes the subform visible.
I have the form and subform built. I have the "Search Resource"
command button working that makes the subform visible/invisible. What
I don't have, code-wise, is the code to set the parameters in the
query, have the results show on the main form, and clear them out when
you go to search again.
whew....I understand the logic of it and I know it's possible.
However, I'm not savvy enough in SQL to make it happen.
Any hints, code snippets, or direction would be greatly appreciated.
Thanks.