Results 1 to 3 of 3
  1. #1
    tgwacker is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2013
    Location
    Columbia, SC
    Posts
    9

    VBA Code Returning Error Run Time Error 3061


    I have the following VB code:
    Set dbDataBase = CurrentDb
    Set rstAddress = dbDataBase.OpenRecordset("SELECT AddrAddrFirstName, AddrAddrLastName " & _
    "FROM tblAddrAddress WHERE AddrAddrAlphaName = Me.AddrAlphaName")

    When it executes, I get the following error:
    Run Time error "3061":
    Too few parameters. Expected 1.

    Any ideas?

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Have you tried

    AddrAddrAlphaName =" & Me.AddrAlphaName)

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm thinking it is a string so the line should probably read:
    "FROM tblAddrAddress WHERE AddrAddrAlphaName ='" & Me.AddrAlphaName & "'")

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Run-Time Error 3061
    By GraeagleBill in forum Programming
    Replies: 2
    Last Post: 09-23-2013, 06:46 AM
  2. Replies: 0
    Last Post: 07-16-2012, 05:42 AM
  3. Run-time error 3061
    By boywonder in forum Programming
    Replies: 1
    Last Post: 07-20-2011, 06:14 AM
  4. Run-Time error 3061
    By boywonder in forum Programming
    Replies: 12
    Last Post: 05-24-2011, 10:15 AM
  5. Replies: 1
    Last Post: 05-21-2011, 01:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums