Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2016
    Posts
    14

    Unanswered: One form for many queries?

    Hi,

    Is it possible and if so how to use one form for different queries?
    All the queries basically are the same. They have the same fields, but the "Criteria" for some of the fields is different.


    Thank you in advance!

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    Have a combo box that reads from a table, tQrys2Use.
    Caption, qry

    User picks the CAPTION they want to open, this will assign the QRY to the form.
    CboBox AFTERUPDATE.
    Me.rowsource = cboBox.

  3. #3
    Join Date
    Jan 2016
    Posts
    14
    Thank you for the solution!

    However, I tried to use the principal you described to get data from a specific query by clicking on a button instead of making selection from a combo box.
    Here is the code I wrote, but it doesn't work. I definitely missed something. Any suggestion?

    Code:
    Private Sub cmdAddToColnect_Click()
        
        DoCmd.OpenForm "frmMainForm", acNormal
        Me.RecordSource = "qryAddToColnect"
        DoCmd.Maximize
        
    End Sub

Posting Permissions

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