Re: deleting records
- From: "DP" <DP@xxxxxxxxxxx>
- Date: Sat, 25 Feb 2006 13:55:57 GMT
hi,
how come that works, if i assign it to a double click, but not work if i
assign it to a delete button?
I still get that error sometimes.
i'm trying to get it to work with the delete button, as it makes more sense.
(if u know wat i mean).
u dont normally double click to delete somthing.
dev
"PC Datasheet" <nospam@xxxxxxxxxxx> wrote in message
news:v6JLf.3131$S25.2446@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
If your subform is a continuous form, all the fields in any row comprise arecord,
record. You could put the code in the double click event of any field in a
row and when you double clicked on that field, the entire record would be
deleted. If your subform is a single form, all the fields you see in the
subform at any point in time comprise a record. You could put the code in
the double click event of any field in the subform and when you double
clicked on that field, the entire record would be deleted.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1125 users have come to me from the newsgroups requesting help
resource@xxxxxxxxxxxxxxx
"DP" <DP@xxxxxxxxxxx> wrote in message
news:g8GLf.35537$Fy4.23922@xxxxxxxxxxxxxxxxxxxxxxx
well yea, i have the main form open. it does not display the same
(whichbut it does display the same membershipID which is in the subform.
theis
wat i;m trying to delete)
how would the code u gave me help? as u would have to double click each
field wouldnt u?
dev
"PC Datasheet" <nospam@xxxxxxxxxxx> wrote in message
news:jjpLf.2875$5M6.1878@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Error 3197 will occur if you have another form open that displays thedouble
same
record. Do you have another form open?
An easier way to delete a record is to put the following code in the
click event of any field on your form:
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
--
PC Datasheet
Your Resource For Help With Access, Excel And Word
Applications
Over 1125 users have come to me from the newsgroups requesting
help
resource@xxxxxxxxxxxxxxx
"DP" <DP@xxxxxxxxxxx> wrote in message
news:eKnLf.15130$gB4.9220@xxxxxxxxxxxxxxxxxxxxxxx
hi,
i've got a form, with a subform in it. i've got a delete button in
FilmID="subform. the code i;ve got is;
Private Sub cmdDeleteRecord_Click()
msg = "Are you sure you want to delete this film rental record?"
Style = vbYesNo + vbQuestion + vbDefaultButton2
Response = MsgBox(msg, Style, "Film Rental Database")
If Response = vbYes Then
DoCmd.RunSQL "UPDATE tblFilm SET tblFilm.Available =True WHERE
user&
Me.FilmID
Recordset.Delete
Else
MsgBox "You cancelled the delete operation"
End If
End Sub
so when i lcick the delete button, i get the following error;
runtime error 3197
The Microsoft Jet Database Engine stopped becasue you and another
iare
attempting to change the same data at the same time.
how can i overcome this error, as if i close the DB, and then open it
again,
it will delete the record, and update the correct field?? (currently
have
to press the delete button twice to delete a record)
thanx
.
- Follow-Ups:
- Re: deleting records
- From: PC Datasheet
- Re: deleting records
- References:
- deleting records
- From: DP
- Re: deleting records
- From: PC Datasheet
- Re: deleting records
- From: DP
- Re: deleting records
- From: PC Datasheet
- deleting records
- Prev by Date: How to calculate the difference between values in preceeding records
- Next by Date: Re: searching using text box and query
- Previous by thread: Re: deleting records
- Next by thread: Re: deleting records
- Index(es):
Relevant Pages
|