gary.newport
Registered User.
- Local time
- Today, 23:17
- Joined
- Oct 14, 2009
- Messages
- 79
I have a piece of code that runs a series of update and append queries. However, there are only a few times that these queries need to run and this is based upon another, earlier set of queries (created to inform the user of what is happening).
I would like to create an IF statement that simply looks at the returning record count of the first query and then selects to run the update or append or not.
However, I get an Object Required error message and therefore assume I have the structure VERY wrong.
Any help gratefully received (obviously the above code is test code and not the full system).
I would like to create an IF statement that simply looks at the returning record count of the first query and then selects to run the update or append or not.
Code:
If Queries.qryIMPORTNewTGs.RecordCount = 0 Then
MsgBox "Empty"
Else
MsgBox Queries.qryIMPORTNewTGs.RecordCount
End If
Exit Function
Any help gratefully received (obviously the above code is test code and not the full system).