Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use Query or use build within form

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am self taught. In one of my databases I have build over 140 quearies. At some point I discovered I could create a queary in a blank form by clicking on the "..." next to record source.

Where is the best place to build a query?

 
Phone,
It's a matter of personal preference. I tend to not use the "..." to create a query for a form's recordsource (unless I then save it as a saved query). It's much easier, in my opinion, to have the forms source saved as a visible query, than hidden in the recordsource, where it' saved under a hidden name, beginning with "~".

The key, in my opinion, is to have a naming convention and stick with it. For example, a commonly used convention for queries is to prefix with 'qry'. But many people go further, and would extend the prefix to something like:
qryfrmNNNN--for Form's recordsources, where NNNN is the form's name
qrysbfNNNN--for SubForm's recordsources, where NNNN is the subform's name
qrycboNNNN--for combo box sources, where NNNN can be a combination of Form/Combobox name or vice/versa
qryrptNNNN--for Report's recordsources, where NNNN is the report's name

etc, etc.

This way, you don't see a jumble of strangely named queries, and won't have all sorts of trouble finding the one you want to work on.
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top