Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2012
    Location
    Arizona
    Posts
    4

    Unanswered: Saving Data in a Form

    Good morning,

    I have 10 queries that each require a date range (>=5/1/2012 AND <=5/31/2012). This will obviously change each month and I do not want to go into each query and change this. Is there someway I can setup this range, maybe in a form, so that I can change just the form and it will automatically populate each criteria field in the queries? I'm using Access 2007.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Create your form with 2 textboxes and change the criteria to:

    Between Forms!FormName.FromTextboxName And Forms!FormName.ToTextboxName

    note the form has to be open when the query runs.
    Paul

  3. #3
    Join Date
    Jul 2012
    Location
    Arizona
    Posts
    4
    Is there any way to save the data in the form though and close it? Meaning, is keeping the form open while the queries run the only way?

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    The form must be open to use it in a criteria, but it can be hidden. If you really wanted to close it, you could save the values to a one-record table and join that table in your queries. Not the way I'd go though.
    Paul

  5. #5
    Join Date
    Jul 2012
    Location
    Arizona
    Posts
    4
    Great, thanks Paul!

  6. #6
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    No problemo!
    Paul

Posting Permissions

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