views:

418

answers:

1

Good day...

The root of my issue is that there's no context menu allowing the user to delete a row from a form. The "delete" button on the ribbon is also disabled. In Access 2003, apparently this function was available, but since our recent "upgrade" to 2007 (file is still in MDB format) it's no longer there.

Please keep in mind I'm not an Access dev, nor did I create this app - I inherited support for it. ;) Now for the details, and what I've tried.

The form in question is a subform on a larger form. I've tried turning "AllowDeletes" on on both forms. I've checked the toolbar and ribbon properties on the forms to see if they loaded some custom stuff, but no. I've tried changing the "record locks" to "on edit", no joy. I examined the query to see if it was "too complicated" to permit a delete - as far as I can tell, it's a very simple two (linked) table join. Compared to another form in this app that does permit row deletes, it has a much more complicated (multi-join, built on queries) query.

Is there a resource that would describe the required conditions for allowing deletes?

Thanks in advance...

+1  A: 

Open the query that is the basis for the subform. Can you edit a record? If not, the query is probably the problem.

Are you quite sure the change in functionality happened with the 2007 upgrade? Because the next likely cause is a setting, one of many accesses via the form design interface OR in VBA code.

Smandoli
I'm not positive the function disappeared as a result of the upgrade - I don't monitor this app closely.I will definitely try to delete a record straight from the query "data sheet" view and let you know.
Todd McDermid
Sorry to insult your intelligence, but you know I don't mean the 'datasheet view' of the form, but the query direct, 'nuff said. If the query is updateable, there are more settings on the forms than you cited. ALSO, if the query is not updateable, it CAN be because it has a property set "snapshot."
Smandoli
Ah, nope. If I open the query in datasheet mode straight from the nav pane, I can delete rows through the context menu, and the Records group in the ribbon.
Todd McDermid
I would take offense if you insulted my intelligence, but feel free to continue insulting my ignorance - cause I definitely have that :)The query appears updateable, but I'll look for a "snapshot" type property. What other properties on the form could I look at?
Todd McDermid
Recordset Type on the form is "Dynaset"
Todd McDermid
Data Entry is "No", but all the "Allow" properties are "Yes"
Todd McDermid
Ribbon Name is blank. Shortcut Menu is "Yes". Menu Bar is blank. Shortcut Menu Bar is blank.
Todd McDermid
I affirm your trouble shooting. Also I have to confess at this point that I haven't used 2007! The subform is a control of the main form, so check its properties (I believe you have).If all else failed, you could take two paths: First, Make new edition of the subform, see that it works right in minimal form; then build it up, and see if (a) the problem never appears or (b) you figure it out the cause. Second, run the "Documentor" and feel free to be exhaustive; then export it to PDF and run searches on terms like "locked," "sbapshot," etc.
Smandoli
What's the "Documentor"? And thanks for all the help!
Todd McDermid
Heh heh, I misspelled it: http://office.microsoft.com/en-us/access/HA102706681033.aspx#2http://stackoverflow.com/questions/1093475/search-for-field-references-within-a-microsoft-access-application/1098889#1098889
Smandoli
TYVM - the "Documenter" allowed me to see some code that was controlling the capability. Somehow, my initial code search for "AllowDeletions" didn't find that - and I swear that I did search!
Todd McDermid
Hooray! There are many assorted components, easy to miss something. Awfully fun to be the only adviser on this question with no competition, and am glad you got the problem solved.
Smandoli