How to Delete Record on Subform Whose Source is a Query

cblaine99

Registered User.
Local time
Today, 11:46
Joined
Mar 10, 2016
Messages
29
Hello,

I am trying to make some changes to a form in an Access database application designed by someone else. I am also learning Access as I go along.

The form I want to change has a subform that shows contacts for a company. The subform is populated by a query.

I've noticed that I can edit fields in the records that are shown on the subform. I can also add a record.

I also want to be able to delete a record. But if I select a record (by clicking
in the record selector column) and then right-click the context menu shows
that "Delete Record" is disabled. (Please see attached image.)

Is there a way to enable the deleting of records in the datasheet? Perhaps there's an option when running the query that allows the records in the resulting datasheet to be deleted?

Thank you.
 

Attachments

  • Customer.gif
    Customer.gif
    45.9 KB · Views: 178
You could add a button using the wizard to create a delete button on the left of the continuous form or click the record selector and press delete on your keyboard one way should work


mick
 
Open the sub form in design view and open its properties sheet. In the Data tab make sure Allow Deletions = Yes


Sent from my iPhone using Tapatalk
 
Open the sub form in design view and open its properties sheet. In the Data tab make sure Allow Deletions = Yes


Sent from my iPhone using Tapatalk




Lol Didn't see the delete option on the shortcut toolbar
 
Try deleting from the query itself. If you can then
- maybe Allow Deletions is set to no on the form, or
- try unchecking "allow layout view" from 'current database' options
EDIT : the table involved isn't a sql server (or similar) table by any chance?
 
Last edited by a moderator:
The suggestion by MickJav solves the problem. If I select the record and press delete the record is deleted. Thanks to everyone for their suggestions.
 
One Note About that is anybody using the database can delete records I tend not to enable the record selector not sure if it will work without the selector?
 
The suggestion by MickJav solves the problem. If I select the record and press delete the record is deleted. Thanks to everyone for their suggestions.

Too bad you didn't try the layout option, assuming you have it as "allowed" as it seems it was a known bug about 10 yeara ago. I always turn it off so I'd never know if it was fixed. Not being in the habit of deleting records would be another reason for not knowing if that works.
 

Users who are viewing this thread

Back
Top Bottom