Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting Records via a command button and via menu

Status
Not open for further replies.

Poem

Programmer
May 22, 2003
3
GB
Have created a tabbed form.

I am trying to delete a record, it appears to delete OK get the message 'You are about to delete a record ....etc'. It then disappears off the forms recordset, but when then coming out of the form and going into the table or re-entering the form, the records are still there.

I can however delete it straight from the table, I have deleted all the relationships to the table to see if it may be something to do with that, but no luck

Has anyone got any ideas what is happening.

 
It depends on where your focus is currently set. If you are using subforms and the delete button is on a subform, it will delete the subrecord (the record on the subform).


If you want to delete the main record, manually set the focus to the main form, then do the delete process. For additional kicks, replace Microsoft's crazy code with:

Code:
If Not Me.NewRecord Then
    RunCommand acCmdDeleteRecord
Else
    RunCommand acCmdUndo
End If


If the above isn't your problem, then I don't know what's going on. Obviously it's deleting something.

--
Find common answers using Google Groups:

Corrupt MDBs FAQ
 
Hi there, thanks for the reply
Yeh.....I have created a form with multi tabs, this contains two tables information, one for the candidate details, the second one containing their course details.

When, trying to deleting the candidate, it deletes the course details but not the candidate details, these two tables are joined one to many. with cascading deletes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top