Results 1 to 2 of 2
  1. #1
    timits35 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Apr 2018
    Posts
    1

    Search Forum

    Hi,

    I have been trying to follow a video to create a search form and I am stuck. I would like to put combo boxes on a form and the results show up on the same form in a sub form. I have started with 1 and cannot get it working.

    Here is my code

    The combo box is cboAcademy and my subform is called frmSearchResult


    I am getting an error message Compile error - Method or data member not found on the line Me.frmSearchResult.Form.RecordSource = myAcademy

    Private Sub cboAcademy_AfterUpdate()
    Dim myAcademy As String
    myAcademy = "Select * from tblParticipant where ([AcademyIDFK]= " & Me.cboAcademy & ")"
    Me.frmSearchResult.Form.RecordSource = myAcademy
    Me.frmSearchResult.Form.Requery
    End Sub


    Ideally once I get 1 combo box working, I would like to add more, so if anyone can help with that too it would be great. They would be AND operators.
    Thank you for your help
    Liane

  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
    There's a sample db here:

    http://www.baldyweb.com/BuildSQL.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Search button on forum
    By amerifax in forum Forms
    Replies: 10
    Last Post: 10-17-2012, 03:55 PM
  2. Converting dBase forum to Access forum
    By amerifax in forum Forms
    Replies: 5
    Last Post: 07-03-2012, 01:12 AM
  3. Any forum for ASP.NET
    By coolpal9 in forum Access
    Replies: 1
    Last Post: 01-13-2012, 01:09 PM
  4. forum help!
    By karanvemuri in forum Forms
    Replies: 9
    Last Post: 09-06-2011, 11:10 AM
  5. How to filter/search using a forum?
    By MediaCo in forum Access
    Replies: 3
    Last Post: 07-04-2011, 03:30 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