J
Judy
I am trying to execute a make table query with one parameter in vba.
After much researching in this forum, I have tried to define the
parameter in code, but i still get the error message that it is
expecting a parameter. Any help would be greatly appreciated.
Judy
Dim dbs As DAO.Database
Set dbs = CurrentDb
DoCmd.SetWarnings False 'turn off warnings
dbs.TableDefs.Delete "tblmyvar" 'delete old copy of table
Err.Clear
Dim qdf As QueryDef
Set qdf = dbs.QueryDefs("qmyv")
qdf.Parameters(0) = [Forms]![Report Menu - Project
Status]![Combo77]
dbs.Execute "qmyv"
dbs.Close
Set dbs = Nothing
rst.Close: Set rst = Nothing
Set qdf = Nothing
DoCmd.SetWarnings True
After much researching in this forum, I have tried to define the
parameter in code, but i still get the error message that it is
expecting a parameter. Any help would be greatly appreciated.
Judy
Dim dbs As DAO.Database
Set dbs = CurrentDb
DoCmd.SetWarnings False 'turn off warnings
dbs.TableDefs.Delete "tblmyvar" 'delete old copy of table
Err.Clear
Dim qdf As QueryDef
Set qdf = dbs.QueryDefs("qmyv")
qdf.Parameters(0) = [Forms]![Report Menu - Project
Status]![Combo77]
dbs.Execute "qmyv"
dbs.Close
Set dbs = Nothing
rst.Close: Set rst = Nothing
Set qdf = Nothing
DoCmd.SetWarnings True