hi
i have a problem in my program
-----------------------------------------
Private Sub bDel_Click()
Dim MyDB As Database
Dim MyQ As QueryDef
Set MyDB = OpenDatabase("C:\Prggolsar\dbgolsar.mdb"
Set MyQ = MyDB.CreateQueryDef("Q3"
MyQ.SQL = "DELETE * From tblOrder WHERE (((IDNo)= " & Me.gAllRec.object & " ))"
MyQ.Execute
MyDB.QueryDefs.Delete ("q3"
Unload frmAllRec
frmAllRec.Show
If gAllRec.object = "" Then
Me.bGotoRec.Enabled = False
End If
MsgBox "message",48, "this record has deleted"
End Sub
-------------------------------------------------
when i run my program,it has error that the q3 in alredy exict
i delete it after execute
but it creat it in accsess and dont delet it
what am i doing?
please help me
i have a problem in my program
-----------------------------------------
Private Sub bDel_Click()
Dim MyDB As Database
Dim MyQ As QueryDef
Set MyDB = OpenDatabase("C:\Prggolsar\dbgolsar.mdb"
Set MyQ = MyDB.CreateQueryDef("Q3"
MyQ.SQL = "DELETE * From tblOrder WHERE (((IDNo)= " & Me.gAllRec.object & " ))"
MyQ.Execute
MyDB.QueryDefs.Delete ("q3"
Unload frmAllRec
frmAllRec.Show
If gAllRec.object = "" Then
Me.bGotoRec.Enabled = False
End If
MsgBox "message",48, "this record has deleted"
End Sub
-------------------------------------------------
when i run my program,it has error that the q3 in alredy exict
i delete it after execute
but it creat it in accsess and dont delet it
what am i doing?
please help me