Gary_Mc_Mahon
Board Regular
- Joined
- Apr 30, 2003
- Messages
- 87
Hi, Can someone please help me, this is driving me mad. I keep getting run time error with an invalid arguement around the line "set qdf......"
I have the Microsoft DAO 3.6 Object Library selected.
Private Sub Command1_Click()
Dim qdf As DAO.QueryDef
Dim db As DAO.Database
Dim strSQL As String
Set db = CurrentDb
strSQL = "SELECT tbl_RR19_Charge_Bucket_200212.* " & _
"FROM tbl_RR19_Charge_Bucket_200212;"
Set qdf = db.CreateQueryDef("qry_ZZTESTSQL1", strSQL)
DoCmd.OpenQuery "qry_ZZTESTSQL1"
db.QueryDefs.Delete ("qry_ZZTESTSQL1")
Set qdf = Nothing
Set db = Nothing
End Sub
Cheers,
Gary
I have the Microsoft DAO 3.6 Object Library selected.
Private Sub Command1_Click()
Dim qdf As DAO.QueryDef
Dim db As DAO.Database
Dim strSQL As String
Set db = CurrentDb
strSQL = "SELECT tbl_RR19_Charge_Bucket_200212.* " & _
"FROM tbl_RR19_Charge_Bucket_200212;"
Set qdf = db.CreateQueryDef("qry_ZZTESTSQL1", strSQL)
DoCmd.OpenQuery "qry_ZZTESTSQL1"
db.QueryDefs.Delete ("qry_ZZTESTSQL1")
Set qdf = Nothing
Set db = Nothing
End Sub
Cheers,
Gary