Dao.recordset findfirst

ClaraBarton

Registered User.
Local time
Today, 02:49
Joined
Oct 14, 2019
Messages
661
With rst
.FindFirst "[MemID] = " & intMemID & " And [ChildID] = " & intChildID
If .NoMatch Then
.AddNew
!MemID = "intMemID"
!ChildID = "intChildID"
.Update
.Bookmark = .LastModified
.Close
Operation is not supported by this type of object

I have set the recordset as DAO
I debugged intMemID and intChildID and both are returning proper integers

And still I get the above error on the Findfirst line. Can you help me?
 
How is the recordset opened?
 
Well! I found the answer on Allen Browne. I changed it to:
("[MemID] = " & intMemID & ")And ([ChildID] = " & intChildID)
What's the difference? Don't know. Works! Thanks for your attention
 
Interesting. You didn't change anything else? The original syntax looked fine, in fact the new syntax doesn't look valid with the first parentheses outside the quotes.
 
I do not get it either. The first looks OK the second looks Jacked.
 
Well! I found the answer on Allen Browne. I changed it to:
("[MemID] = " & intMemID & ")And ([ChildID] = " & intChildID)
What's the difference? Don't know. Works! Thanks for your attention

Hi Clara. Sorry, that doesn't make sense to me either. Can you please post a link to Allen's website where you found this? Thanks.
 
I don't know about the error of the FindFirst line. However
Code:
!MemID = "intMemID"
!ChildID = "intChildID"
is trying to insert the literal text characters into integer fields.
Should be
Code:
!MemID = intMemID
!ChildID = intChildID
 
Sorry I ignored you because my error was so embarrassing! I had quotes around what should have been numbers so naturally it was changing it to text. I had spent too much time on it so I went to you all because you seem to know all. Text can look like integers in the immediate box. I just fix one tiny thing at a time. Thank you for your help.
 
Glad you got it sorted, though I don't see that causing the initial error on the FindFirst line.
 
Sorry I ignored you because my error was so embarrassing! I had quotes around what should have been numbers so naturally it was changing it to text. I had spent too much time on it so I went to you all because you seem to know all. Text can look like integers in the immediate box. I just fix one tiny thing at a time. Thank you for your help.
Hi. Error messages are good clues. Without them, we could be telling you something irrelevant. Since we can't see what you're looking at, we can't be expected to know what's going on with your database. There's no need to be embarrassed because we all went through the same situation when we were starting out. We're here to offer help without passing judgement. Cheers!
 

Users who are viewing this thread

Back
Top Bottom