Results 1 to 3 of 3

Thread: FindRecord Help

  1. #1
    Join Date
    Mar 2003
    Location
    UK
    Posts
    71

    Unanswered: FindRecord Help

    Help, I don't understand why this is happening!

    I'm trying to use docmd.FindRecord to search from users input in an input box and I keep getting a run time error 2046, findrecord is not available. but i can use the find option on the menu bar.

    Any ideas why this might be happening?

    This is the code i am using:

    Dim fndAssetNo As String

    fndAssetNo = InputBox("Enter the Asset Number you want to find", "Find Asset Number")
    txtAssetNo.Enabled = True

    If fndAssetNo <> "" Then
    txtAssetNo.SetFocus

    DoCmd.FindRecord fndAssetNo, acAnywhere, False, acDown, True, acCurrent, True

    End If

    I've aslo tried:

    DoCmd.FindRecord FindWhat:=fndAssetNo, match:=acAnywhere, matchcase:=False, search:=acSearchAll

  2. #2
    Join Date
    Apr 2003
    Location
    Belgium
    Posts
    5

    Question

    Where do you want to show the results of search? In a form/report or in a table?

    have you tried searching with this string?
    DoCmd.FindRecord fndAssetNo, acAnywhere, False, acDown, FALSE, acCurrent, True

    Good Luck!

  3. #3
    Join Date
    Mar 2003
    Location
    UK
    Posts
    71
    thanks, i think it was just a glitch in access, because when i came back to it the next day it was working with the code i was using.

Posting Permissions

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