David Kennedy said:
Question:
Can anyone tell me if its best practice to base your form on a Table or a
Query of Table?
Thanks
David K
From a performance point of view, there is little, or any difference.
however, a query is often preferred since you can set the order to the data
for the form. This is especially so the case for sub-forms, and say you want
to set a order to the sub-form. So, for combo boxes, forms, sub-forms etc,
using a query lets your set, or "force" the order of the data you want.
And, as pointed out by the other poster (Dave), you can also use a query to
bring in values from other tables. Often, some values, or information needs
to be included, and sometimes you can use a query in place of using
something like a sub-form.
So, there is not really a hard and fast rule..but queries tend to give more
flexibility, and do let you force the order of the data in a easier fashion
then just binding the form to a table. However, often I still just bind a
form to a table, but then I ask the user BEFORE the form loads as to what
record to display (that means no navigation buttons are needed to move from
record to record. This means sort order don't matter. And, asking the user
what reocrd to edit BEFORE opening the form is a a good approach, as then
you don't waste computer resources loading a bunch of records that you are
not going to use, or even view,.
You can read up on this idea of only loading the information that the user
needs here:
http://www.attcanada.net/~kallal.msn/Search/index.html