Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

creating query in record source of form compared to creating a query

Posted on 2011-03-20
3
Medium Priority
?
313 Views
Last Modified: 2012-05-11
Hello,
What is difference of creating a regular query and creating on in the record source of form?
also I have 3 subforms on a main form- I read some paper on if you have subform based on query - it is better in the record source- is that true?does it matter? and is there a difference?
thank you
0
Comment
Question by:davetough
3 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1600 total points
ID: 35176250
If you mean comparing using an SQL statement as the RecordSource vs a Saved Query, JET has a better chance of optimizing the Saved Query than an SQL statement.  So, using a Saved Query is probably the better choice.

For a combo/list box, where there are just a few records in the list, based say on a small lookup table ... especially one that does not change often, then I'm not seeing a big difference between using an SQL statement vs a saved query for the Row Source.

mx
0
 
LVL 44

Assisted Solution

by:GRayL
GRayL earned 400 total points
ID: 35176313
I agree with mx, I think you are better off to use the named query as a recordsource rather than typing in the SQL in the recordsource - especially for large complex queries - especially when troubleshooting.  I would far rather modify a query affected by a table design change than go into the design view of the form and try and do it there.
0
 

Author Closing Comment

by:davetough
ID: 35176471
thanks
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question