Delete button question

S

short

I am having issues with my form, where when the delete button is pushed in
and the user goes to delete the row in table on a subform some subforms will
delete while others will say 'Records not deleted. Data is read-only. Is
there any way to fix this?

Here's the code for the delete button:

Private Sub tgDelete_Click()
Call reload
End Sub

For reload:
Public Sub reload()
Call btnSelect_Click
Call btnGo_Click
End Sub

here's another part of the code:

'///////////////////////////////////////////
'This part checks to see if the Buttons (new, edit, or delete)
'are pressed in. If they are then it will
'make sure that you can edit, add or delete in the form.
'
'sets the "Add New" button to let additions in the form
If tgAdd.value = True Then
Addbool = True
ElseIf tgAdd.value = False Then
Addbool = False
End If

'sets the "Edit" button to let Edits in the form
If tgEdit.value = True Then
Editbool = True
ElseIf tgEdit.value = False Then
Editbool = False
End If

'sets the "Delete" button to let Deletions in the form
If tgDelete.value = True Then
Deletebool = True
ElseIf tgDelete.value = False Then
Deletebool = False
End If

'///////////////////////////////////////////

keep in mind, I did not program this. I wish that it wasn't as easy as it is
in the subforms that do work, you just press the button and then can select
any row in a subform/table and press delete. I'm trying to figure if I should
just change it to having an edit form where the user can edit/delete items in
each table.

Any suggestions would be appericated.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top