Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    BECCLES, Suffolk, England
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Data input to a query (WXpHe OrificeXp)

    Please help - as this must be a basic request: I have designed a query that requires me to input two pieces of data to extract the information I require. The two fields are code (4 letters) and year (i.e. 2004). The information is then directed to a report that has four subforms [each based on the same query] in it (each of A4 size). The data shows up ok, but how do stop having to enter the code and year 4 times?
    <IMG SRC=http://www.wopr.com/w3tuserpics/StephenElms_sig.jpg> Didn't think that I made my first post here on 5th February 2001...!

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Data input to a query (WXpHe OrificeXp)

    Create a form and in design view, place several textboxes on the form. Right click on each textbox after it has been created and in the properties for the textbox provide a name (example: txtHoldNumber). Save the form and give it a name (example: frmInfo). Type the information you want to feed to your reports into each textbox on your form and in the query that feeds each report or subreport you can provide criteria referencing the text you have typed into these boxes (example: Forms!frmInfo!txtHoldNumber). You can even place a button on your form to print your report.
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Data input to a query (WXpHe OrificeXp)

    The simplest solution is to create a form on which you fill in the two pieces of data (code and year), and then you replace the parameters in you query with something like:
    <font color=blue><font face="Georgia">Forms!myForm!myCode</font face=georgia></font color=blue> and
    <font color=blue><font face="Georgia">Forms!myForm!myYear</font face=georgia></font color=blue> where myCode and myYear are the names of the text boxes on the form.
    There are other approaches using VBA that will accomplish the same thing, but you may not want to learn VBA today. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Wendell

Posting Permissions

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