Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2011
    Posts
    8

    Unanswered: Output to flat file?

    OK, please be gentle and let me know nicely if this is a stupid request!

    Essentially what I am hoping to do is to be able to output a query result that looks something like ...

    Date Name Amt Method
    01/06/2011 Joe $600 EFT
    01/07/2011 Joe $900 Chq
    01/08/2011 Joe $100 EFT

    ... into another query so it looks like

    Name Amt1 Amt2 Amt3
    Joe $600 $900 $100

    Possible, or am I delusional?!

    sjacko

  2. #2
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372
    Yes, it's possible.
    Look at "DemoCrostabQryA2000.mdb (attachment, zip).
    Look at Table1, Query1 (column 4), Query1Crostab, Form1 (Vba), Module1.
    Open Form1 and click on command button.
    Look at tblNewOne.
    Attached Files Attached Files

  3. #3
    Join Date
    Oct 2011
    Posts
    8
    Thanks for the reply and code. Have had an initial look and it works, now will see if I can get it to do exactly what I'm trying to.

    sjacko

  4. #4
    Join Date
    Oct 2011
    Posts
    8
    Thanks again - have had a look and it has taken a while to get my head around what is happening, but in the end success

    Only subsequent questions are:

    * am I able to call or reference that code automatically from other queries etc? If so, how? (That code being:
    Code:
    Private Sub Command0_Click()
    On Error GoTo Err_Command0_Click
        wNum = 0
        wName = ""
        DoCmd.SetWarnings False
        DoCmd.OpenQuery "Query1"
        DoCmd.OpenQuery "Query1Crostab", acNormal, acEdit
        DoCmd.SetWarnings True
    
    Exit_Command0_Click:
        Exit Sub
    * if possible, can I enter a parameter - in this instance date - either manually or automatically in order to output say the four entries prior to a specific date?

    Your patience, guidance and assistance, whilst they don't make up for my lack of skill in this area, are greatly appreciated!!

    sjacko

  5. #5
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372
    1) I dont know what you want. This code is from "Form1" not from query.
    If you want it, you have to write a new code, depending on what you want to do.
    Yo have to learn how to make a program.

    2) Yes you can do it.
    Look at Demo (a new one). In Form1 I add 2 fields (DateFrom and DateTo).
    Look at "Query1", (column 5).
    Look at Form1 "Default value" properties in the fields (DateFrom and DateTo).
    Open Form1 and try.
    Use your date format (short date, 01/06/2011 and s.o.)
    Attached Files Attached Files
    Last edited by MStef-ZG; 11-03-11 at 10:01.

  6. #6
    Join Date
    Oct 2011
    Posts
    8
    Thanks again ... am slowly working my way through it when can spare some time, so slow progress. Maybe even learning a little about programming in the process - last time I did much programming was around 1993, so a little has changed since then!

Posting Permissions

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