I have a table and I created a query , both of them have the same fields.
I created a form to enter data based on the table (record source of the form is the table).
Is there a difference if the record source was the query?
Khalil
I have a table and I created a query , both of them have the same fields.
I created a form to enter data based on the table (record source of the form is the table).
Is there a difference if the record source was the query?
Khalil
No - providing query is based on just one table, you should see no difference.
Many experienced developers make a practice of always basing Forms on single-table Queries, feeling that this adds an extra level of 'protection' to the data, much in the way that never entering data directly into a Table does. Whether this actually does add a layer of protection is open to debate, of course, not being something that can really be measured, but it can't hurt...and it only takes an extra thirty seconds to run up such a Query, using the wizard.
A second reason for using a Query is that you can readily create calculated Fields in them, and simply bind Controls in the Form to them. You can, of course, do this, in Form Design View, using an Unbound Control's Control Source Property, so, once again, it's a matter of preference.
Linq ;0)>
Good comments linq. I would add that using a query can also reduce the load on the network and therefore performance, both in terms of 'width' (number of fields) and 'depth' (number of records). Not too apparent when dealing with low volume tables, but will become apparent when a form is based on a high volume of records