Form Creation

S

Sharkbyte

Do you recommend SQL statements, in the RecordSource property, or a saved
query? Any particular reason?

Thanks.
 
P

Paul Overway

It is a saved query whether you explicitly save it or not. If you don't
save it explicitly, it gets saved with a ~ followed by the form name...such
queries don't show up in the container, but they're there nonetheless.
Personally, I like to save them explicitly...since Access does it anyway.
BTW, this behavior applies to combo/list rowsource as well.
 
S

Sharkbyte

Thanks, Paul.

So, ultimately, there is no space savings by saving them as a RecordSource.

What about action queries written into the code vs. saved queries? I would
think that because the query doesn't 'exist' until the code is run, Access
simply treats it as text within the Code window.

Sharkbyte
 
P

Paul Overway

For any query, there is a slight improvement in performance if it is
saved/compiled....although in most cases the improvement will be
imperceptible. Doing this requires good planning in respect to parameters
required though. Also, there may be some advantage from a maintenance
standpoint, if you explicitly save queries vs saving/using them in code,
i.e., setting ULS permissions. However, in any case, you really need to use
a good naming convention that allows you to keep track of how/where a query
is used. Maintaining an app can be a real PIA if you're not following a
good naming convention.

As for space in the database, queries are seldom anything to worry about.

--
Paul Overway
Logico Solutions
http://www.logico-solutions.com

I DON'T ANSWER EMAIL. POST TO THE NEWSGROUP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top