Expand|Select|Wrap|Line Numbers
- Dim dblADID as Double
- dim intSID as Integer
- dim db as Database
- dim rstE as Recordset
- set rstE = db.openrecordset("UAInfo", dbOpenTable)
- dblADID = 123
- intSID = 324
- With rstE
- .FindFirst "(cdbl([ADID]) = " & cdbl(dblADID) & ") AND (cint([SID]) = " & cint(intSID) & ")"
- Debug.Print !ID
- If .nomatch then
- 'do this
- Else
- 'do this
- End If
- End With
Each criteria works with .findfirst separately, but not when combined with the AND operator. I've tried everything I can think of, changing the syntax, converting to different data types. Nothing works. No idea why. Both Fields are number fields.
The !ID is always the first record ID. .NoMatch doesn't recognize as NoMatch, it fires as a match, even though it isnt. It always goes to the else of the if statement.
Edit: Added additional code.
UAInfo is a table. Technically a web table (sharepoint list).