Basing Forms on Queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

All of the books I read on Access strongly recommend basing forms on a query.
However, when I tried doing such, it works but I cannot enter any NEW
records. Can someone please advise what I'm doing wrong in Access 2003?

Thanks
 
The query itself must produce an updateable recordset. Open the query and
check that you can add/edit records in the datasheet view of the query.
There are a number of reasons why a query may not be updateable - a search
on this group will find regular postings on this topic.

HTH,

Rob
 
Robert T said:
All of the books I read on Access strongly recommend basing forms on a query.
However, when I tried doing such, it works but I cannot enter any NEW
records. Can someone please advise what I'm doing wrong in Access 2003?

The advice is to use a query so you can...

Limit fields to only those that the form needs
Limit rows to only those that the user needs

The advice does not mean you should try to use a query that contains multiple
tables. While it is possible to construct such a query and still make edits to
the Result-Set very often a multi-table query will end up as read only. In
general you should bind forms to tables or to queries based on single tables and
then use subforms or pop-up forms to deal with related data from other tables.
 
Hello Rick:

I had a difficult time getting onto this website yesterday and today I've
been working on other problems, reports and parameter issues. They're pretty
basic stuff but I'm new to Access so I need the knowledge.

I havent' had time to return to this issue but I will do so tonight. For
now, let me say it was not a multi-table query. I created a query on a flat
file table and I could enter records in the dynaset, however I could not
enter them on the form.

If I understand you correctly, more often than not, I should create queries
on indivdual tables and then combine them to make a multi-table form. Or
should I make one query on both a Parent and Child Table for the form?

Thanks,
RT
 
If I understand you correctly, more often than not, I should create queries
on indivdual tables and then combine them to make a multi-table form. Or
should I make one query on both a Parent and Child Table for the form?

No. You should make a Form (for the "one" side table) with a Subform
(for the "many").

John W. Vinson[MVP]
 
Back
Top