Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Posts
    99

    Unanswered: Report Sorting & Grouping

    Hopefully a no brainer?

    I have a report driven by a query with financials results Jan - Dec

    Report is driven by a macro button... no probs but can I get the report to be sorted and grouped by choosing a month to sort on....?

    not sure if I am being very clear but could the query prompt which month to sort the records on.... this way on pressing report macro the first thing it would do would prompt for which month to sort on?

    Many thanks for any help.
    pachamama
    www.researchbank.co.uk
    Fortune Global 500 Databank

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    sorry I odn't understand what you want to do
    do you mean select only one month?

    ..if so amend your query to extract the specific month
    or use a filter
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Feb 2004
    Posts
    99
    Thanks for your comments.... I can't speak the tech talk so will answer in laymans terms I'm afraid.

    I have a db of clients and their monthly turnover so the report reads

    X client - Jan Sales - Feb Sales - March Sales etc - Annual Sales

    At present they are easily sorted ascending/descending by either month sales or x client name or annual sales etc.

    What I want is a moving feast so that at any given point I can run the report and be prompted/asked which month to sort the clients on without having to rewrite the report or query.

    Thanks for any help.
    pachamama
    www.researchbank.co.uk
    Fortune Global 500 Databank

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so i'd suggest you put two controls on your switchboard/menu one identfying start date one end date, lock them so the data cannot be altered by the user
    load them with appropriate defaults on start up

    have another form which sets parameters and pushes those onto the switchboard

    eg
    forms!frmswitchboard.tbStartDate.Text = format (mystartydate, "yyyy mmm dd")
    forms!frmswitchboard.tbEndDate.Text = format (myEnddate, "yyyy mmm dd")
    .along with any other parameters (eg customer, product whatever)
    the reason for using a subform to set the parameters is that you can validate the info is correct ie a proper date, customer number whatever

    then you chaneg your queries to read the value from the switchboard form

    eg
    where Transactiondate= between forms!frmswitchboard.tbStartDate and forms!frmswitchboard.tbEndDate

    that should get you aprt way theree but you will have to do a bit of VBA coding to get there.

    you could 'just' request a parameter in the query


    eg
    where transactiondate between [Start Date] and [End Date] but this means if you use the same date brackets for each report you have to re-enter the dates each time, the user has to enter a valid date and so on.

    the form way is neater and less intrusive to the user.
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Feb 2004
    Posts
    99
    Many thanks healdem, I know it makes sense just have to make sense out of it!!
    pachamama
    www.researchbank.co.uk
    Fortune Global 500 Databank

Posting Permissions

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