Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013

    Unanswered: Adding a Query to a Report

    I have a several reports for each month which are connected to a corrisponding table with identical captions. Two of the captions are "totalbankedhours" & "totalTemphours"

    My boss would like on each report a table of the toal previous banked hours and temphours for each month to automatically update.

    As the control source is set to the corrisponding monthly table that cannot be changed

    So I attempted to add an unbound textbox and add the source information through their but it would not work due to the captions being the same in the tables

    So I created a query and added the information to there with a AugustBH: and SeptemberBH: infront of the information in the feild section. Query runs and displays correct information.

    So how do I add the query to an unbound text box ? through an expression I persume its using the select command but trial and error has got me no where

    Any ideas


  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    As the control source is set to the corrisponding monthly table that cannot be changed
    please tell me you haven't created a table for each month... say it aint so, please

    for a periodic reporting suite I'd normally have a form which stays open whilst the rport is run. define on there parameters which the rpeorts use (ferisntance start/stop dates, specific products, customers, min/max spend and or business units.. y'get the picture.
    on that form you then call the report and either set a filter on the report opneing or pick up parameters in the reports query. of the two you are probably better off using a filter on the call to open the report or form. (see do.cmd openreport and openform macros)

    the advantage of this approach is that you have consistent parameters throughout the report suite. I tend to allow the user to change stuff in a separate from so that its not easy for a user to make changes to the report parameters.. they have to make a deliberate choice to change something.

    providing you have normalised your data then it shoudl be relatively easy to do what you want
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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