Cannot Edit records through a Data Access Page

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

Guest

This has got to be really simple... but I give... what is the secret to
getting a data access page to allow me to edit a record in a table? I can
edit the records through a form, but the same form saved as a Data Access
Page shows me a dimmed Save icon. Any help would be so greatly appreciated.
 
Data Access Pages are more often noneditable because the query does not
allow the identification of the unique table being edited. DAPs often won't
work with a query that works just fine in a form.

Did you set the Unique Table property of the Section's Data tab to be the
table that is being edited?
 
Thanks Ken,
still no active edit icon.... I checked the Unique Table Property...
that doesn't appear to be the problem. I've tried this on two different
desktop systems with the same results. Running Access 2003 over a previous
Access 2000 install. I just now deliberately removed the 2000 install in
hopes that might clear up some residual effect of an older version.. no luck
still.... any other ideas?

Thanks again.
Pat Norman
 
To which save icon are you referring? If you're referring to the Save icon
on the toolbar, that will be disabled for a Data Access Page. You don't use
that icon for saving edits to your data...instead, put a button on your page
to do the saving (there is a wizard that will do this for you when you're in
design view).
--

Ken Snell
<MS ACCESS MVP>
 
Thanks Ken... sorry to take so much of your time. It never occurred to me
that the Save icon would never be active on a DAP (a side question is "why is
it even there?").
So I have now added a Save button and when I attempt to use it I get
the message "You can't add a new record or delete an existing record because
the recordset for this page is read-only." Any idea what I have to do next?

Thanks for your patience.
Pat Norman
 
Yes... your query is not updatable in the DAP setting. DAPs will not work
with many queries that work just fine in a form. Post the SQL statement of
the query that you're trying to use and let's see.
 
Thanks again Ken,
actually, the page refers directly to a simple table. There isn't a
query in the page at all. Could this have anything to do with the connection
string or security?

Thanks.
Pat
 
Do you have create/read/write/delete privileges to the server folder where
the database file is located? You need these accesses in order to edit data.
 
Yes.... the .mdb is on my desktop.

Ken Snell said:
Do you have create/read/write/delete privileges to the server folder where
the database file is located? You need these accesses in order to edit data.
 
Did you set the Unique Table property of the section that holds the fields /
controls of the page's recordset to the name of the table?
 
Also, do you have a control on the page that is bound to the primary key
field of the table? The control can be invisible/hidden, but it needs to be
on the page for the page to correctly identify the record.
 
I am using the Page Wizard, selecting a table... selecting fields for
inclusion on the page.... and that is it. The table does not have a primary
key. Is that the "key".. no pun intended....?

Thanks for all your help.
Pat
 
Most likely it is. Without a primary key, ACCESS DAP isn't able to uniquely
identify a record so that it can be edited.
 
Hallelujah! Thanks Ken... I normally don't ever include the primary key on
any of my Access tables... that was exactly what was wrong...Everything is
working perfectly, just like I expected.

Hope I can return the favor someday.
Pat
 
Pat Norman said:
Hallelujah! Thanks Ken... I normally don't ever include the primary key on
any of my Access tables... that was exactly what was wrong...Everything is
working perfectly, just like I expected.


Strong recommendation to you that you always should have a primary key in a
table. You're immediately losing one of the best features of a relational
database when you don't...and having problems like what you saw here.

Good luck.
 
Back
Top