• How Do I ? (2000 (9.0.2720))

    • This topic has 7 replies, 5 voices, and was last updated 23 years ago.
    Author
    Topic
    #369746

    I wish to use an exiting report with a new query. How do I attach the new query to a copy of the report ?
    Many thanks

    Viewing 0 reply threads
    Author
    Replies
    • #582908

      Make a copy of the report.
      Open it in design view.
      Open the Properties window.
      In the Tab Data, you can select the recordsource to the new query by clicking the little down arrow on the right side of the line.

      • #583168

        Many thanks – it works.
        In my query, in the criteria box I have entered the following [Which Post Code?] and the user enters in caps alphanumeric characters like ‘SE1 5JX’ – How can I format the box so that the user needs only enter the first three characters ? Thanks

        • #583181

          I don’t think this is possible without VBA.
          Maybe someone else ?

          • #583241

            I may be missing something, but why not set the default to the first 3 char’s and in the field just before this box, use the send key option.

            i.e. if the default is ABC of txtBox2 (tab order 2) in the afterupdate event of txtBox1(tab order 1) put the send key code to go to txtBox2. Using this method the user would only have to enter the last 3 digits as he/she enters that field.

            Like I said, I could be missing something, if not, I’m sure this will do exactly what you’re looking for.

            Good Luck.

        • #583220

          As Francois suggested, VBA is the most efficent answer, but you can think about a custom dialog form, instead of placing the criteria directly in the query.

          In Access Help, search on “criteria” and then choose “use a form to enter report criteria”. Instead of placing a textbox on the form, like the help text instructs, use a combo box and that will allow you to position via initial characters. Instead of running a report, you could then run the query.

          This is not the smoothest and requires adjustments to the help instructions, but it is the only alternative that comes to mind.

          HTH

        • #583247

          I read your question a little bit differently than the others. Did you mean that you want to be able to enter the first three characters of the postal code and have it match all postal codes that start with those characters?

          Off the top of my head I can’t think of a way to force the user to enter exactly three characters under those circumstances, but if you want the user to be able to enter the first few characters of the postal code and have it match all codes that start with those characters, use something like

          like [Which Post Code?] & “*”

          in your criteria.

    Viewing 0 reply threads
    Reply To: How Do I ? (2000 (9.0.2720))

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: