UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Recordset.findfirst - Run Time Error 3251, Access 2016    
 
   
hemant
post May 24 2020, 02:49 AM
Post#1



Posts: 89
Joined: 19-February 20
From: Mumbai, India


I have a Table: Users
On Login for, the code for the Login button begins with the below code. This is a working code for my other DB files.
However, when I imported the form and table in my new file I get Run Time Error 3251 on rst.FindFirst
Error: This operation is not Supported on this type of Object.

CODE
    Dim db As Database
    Dim rst As Recordset
    Dim SrchCrit As String
    Set db = CurrentDb
    Set rst = db.OpenRecordset("Users")
    SrchCrit = "[UID] = '" & Me.UID & "'"
    rst.FindFirst SrchCrit    '<<<<<<<<<<< Error Line on Debug


The Users table has two records.
The Library references are as attached.

Any idea why would I get this error?
This post has been edited by hemant: May 24 2020, 03:08 AM
Attached File(s)
Attached File  error_3251_on_rstFindFirst.jpg ( 330.82K )Number of downloads: 5
 
Go to the top of the page
 
hemant
post May 24 2020, 04:50 AM
Post#2



Posts: 89
Joined: 19-February 20
From: Mumbai, India


RESOLVED> I found a thread here about similar error.
Below is what resolved the error.

CurrentDb.OpenRecordset("users", dbOpenDynaset)
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    14th July 2020 - 10:58 AM