+ Reply to Thread
Results 1 to 3 of 3

ADODB.recordset.find gives a compile error expected function or variable

  1. #1
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    ADODB.recordset.find gives a compile error expected function or variable

    I have a recordset created and held in a public variable while bouncing through some userforms.
    One of the options I have is an uprevision of the data and I want to use recordset.find to prefill some of the fields in a userform for adding records.
    The error I get is as described highlighting the ".find"
    Please Login or Register  to view this content.
    I am hoping this is just a syntax error because I do not want to have to loop through the recordset as an array.
    Last edited by Leon V (AW); 10-25-2022 at 08:52 PM.
    Sub Reputation()
    Dim Problem as Variant
    Dim Reputation as Integer
    For Each Problem in Forum.Threads
        If Problem.Title = "*[Solved]*" and Solver.Name = "Leon V (AW)" Then Reputation = Reputation + 1
    Next Problem
    End Sub

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: ADODB.recordset.find gives a compile error expected function or variable

    I don't think the Find method returns anything - it should just find the next matching record or set EOF if nothing is found. You can then query the recordset to retrieve the data you want.

    See here for an example: https://learn.microsoft.com/en-us/sq...l-server-ver16

    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    365 32bit Win
    Posts
    1,638

    Re: ADODB.recordset.find gives a compile error expected function or variable

    Maybe something like this.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Compile Error: Expected Function or variable
    By bigmon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-20-2020, 09:22 AM
  2. Getting compile error expected function or variable
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-10-2014, 01:33 AM
  3. [SOLVED] Shell Function "Compile Error: Expected procedure, not variable"
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-09-2014, 01:20 PM
  4. [SOLVED] Compile Error Expected Function or Variable
    By shiser in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-22-2014, 09:18 AM
  5. [SOLVED] Compile error expected function or variable (on protect method)
    By Tirren in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2013, 03:22 PM
  6. Mac issue (please help) "Compile error: Expected Function or variable"
    By m1notaur in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-22-2011, 06:00 PM
  7. Compile Error:- expected function or variable problem
    By skin.uk1 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-08-2011, 02:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1