Results 1 to 3 of 3
  1. #1
    JackT is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    7

    Search problem with form

    I have the following form that has a field that searches for a reference number. When I enter the numbe and hit search I get a pop up wanting me to enter the Enter the parameter value for Me.cmbRef

    here is the code
    'This is the select criteria for reference number
    Me.RecordSource = "SELECT * FROM qryCheckFiles WHERE Me.cmbRef = [APU REFERENCE NUMBER]"
    ' These are the two boxes populated with data
    Text6 = [APU Reference Number]


    Text9 = [PayeeName]

    If i remove the where part of the query Text6 and Text9 do not get updated. I need to know how to search on the ref number with out the popup box.
    Thanks
    Jack

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    You'd have to concatenate the form reference:

    Me.RecordSource = "SELECT * FROM qryCheckFiles WHERE " & Me.cmbRef & " = [APU REFERENCE NUMBER]"

    Which presumes it's a numeric field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    JackT is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    7

    Thanks

    thanks

    Jack

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

Similar Threads

  1. create search form
    By Balen in forum Forms
    Replies: 0
    Last Post: 08-22-2010, 01:01 AM
  2. Search Form VBA
    By rcdugge in forum Programming
    Replies: 2
    Last Post: 07-20-2010, 02:57 PM
  3. Replies: 2
    Last Post: 06-14-2010, 03:25 PM
  4. my search form won't work?
    By sams in forum Forms
    Replies: 5
    Last Post: 05-06-2010, 02:08 PM
  5. Search for record from a form
    By hcoakley in forum Forms
    Replies: 0
    Last Post: 11-26-2006, 11:23 AM

Tags for this Thread

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