Results 1 to 5 of 5
  1. #1
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171

    Does creating a form also create a query?


    I have created a form and a report in design view by dragging fields from a table where I needed them. Works fine but I would like to add criteria before a report opens so it goes only to a specific report. I know when I have created a form based upon a query result I just went in and modified the query with the criteria. If a query was created when I made this form, where do I find it? Thank you.

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    No, creating a Form does not create a new Query. If you based it on the Table, then it is linked directly to the Table.
    However, you can create a new query that has all the fields, calculations, and criteria you want.
    Then you can open up the Form/Report that you have already created, bring up the properties, and change the Record Source from the Table to the Query you just created.

    Note I usually find it best to create the Query first, and then use that to build my Forms & Reports. As matter as fact, even if I don't have any criteria or calculations, I often will still create a Query and base the Form/Report upon that Query. It makes it very easy to add calculations or criteria down the road.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    In addition to Joe's thoughts, you can use this to open a form/report with criteria:

    BaldyWeb wherecondition

    As a side note, if you create a form/report with SQL as the record source (as opposed to a table), it does create a hidden query. In other words, if the record source is "SELECT..." a hidden query is created and saved.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Thank you very much. Afraid that was the case but I will see if I can apply your solution. Going forward, I will always use the query first approach!

  5. #5
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Thanks! I will look into that in a little more depth when I maybe move out of the "beginner" stage!

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

Similar Threads

  1. Replies: 5
    Last Post: 04-05-2014, 08:52 PM
  2. Creating a Browse button to create a Hyperlink
    By detaylor1242 in forum Forms
    Replies: 5
    Last Post: 07-30-2013, 11:48 AM
  3. Possible to create Form for creating queries?
    By darsunt in forum Queries
    Replies: 1
    Last Post: 10-11-2012, 10:05 PM
  4. Replies: 3
    Last Post: 04-27-2012, 08:34 AM
  5. Replies: 1
    Last Post: 06-20-2011, 03:56 PM

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