Dear All
The following code is giving me the error stated ‘Object Variable or With Block Variable not set’. Except the thing is set……..
Dim DbS As DAO.Database
Dim strSQL As String
Dim RsT As DAO.Recordset
Dim strInput As String
Dim stDocName As String
Dim qrydefRework As DAO.QueryDef
Dim strQryDef As String
strQryDef = Forms!gireturnsnotectlfrm!RejectNoteNumber
qrydefRework.Parameters(“[Forms]![GIReturnsNoteCtlFrm]![RejectNoteNumber]”) = Me.RejectNoteNumber ‘This line errors out
Set qrydefRework = DbS.QueryDefs(“ReworkQrydef”)
When I go to debug the VBA editor shows the correct value is being reported in the ‘Me.rejectNoteNumber’ . The thing that is absolutely driving me up the wall is that I’ve used this code, including the variable names, in another event on a different form (I’ve checked they’re both private functions).
I know it’s going to be something simple and stupid that I’ve missed, but after a couple of hours with the books I give up!!!!
Please HELP!!
Thanks
Ian