Deleting a Record

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I'm trying to delete a record on a Subform from a popup form. The
Subform is based on a Query. The popup form is unbound. How can I do this?
Thanks
DS
 
DS said:
I'm trying to delete a record on a Subform from a popup form. The
Subform is based on a Query. The popup form is unbound. How can I do
this?
Thanks
DS

I'm trying this but it says "sub or function not defined"

Private Sub Command196_Click()

CurrentDb.Execute "Delete * From SalesDetailsQ"
WHERE "[LineId] = " & Me![Text2] & " And [ItemID] = " & Me![Text4] & ""

End Sub

Thanks
DS
 
Hi. I just happened to be passing by, looking for a good multi field query
to delete from a subform.

Your last & ""
I am not sure what that does.

Regarding sub not found, have you traced from your button, to properties,
event, and ensure it is referencing your exact sub name, Command196?

Sometimes the reference back to the button gets lost. Just a thought.
--
MichaelM


DS said:
DS said:
I'm trying to delete a record on a Subform from a popup form. The
Subform is based on a Query. The popup form is unbound. How can I do
this?
Thanks
DS

I'm trying this but it says "sub or function not defined"

Private Sub Command196_Click()

CurrentDb.Execute "Delete * From SalesDetailsQ"
WHERE "[LineId] = " & Me![Text2] & " And [ItemID] = " & Me![Text4] & ""

End Sub

Thanks
DS
 
Back
Top