can anyone help me in using a form to access a query but being able to enter
the criteria via a form and the resulting action should open a query based on
the criteria entered nstead of going to the query and editing it.
Set up a Form, unbound - no table or query. Let's call it frmCrit. Put
whatever controls you want to use as criteria - textboxes, combo
boxes, checkboxes, whatever. Let's say you have a table of States and
a combo box cboState, just as an example.
Your Query would have a criterion
=Forms![frmCrit]![cboState]
on the State field.
It would be convenient to create a Form (for onscreen display), or a
Report (for printing), or both, based on this query. Put a command
button on frmCrit to open the form and/or report. The user would open
frmCrit (from a switchboard perhaps), fill in the criteria, and click
the button to display the results, without ever needing to even see
the query in either design or datasheet view.
John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps