Results 1 to 15 of 15
  1. #1
    McArthurGDM is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    215

    Particular Crosstab Query Problem (w/ parameters)

    I have a form with a subreport built into it. Here is the picture. (mind you that I am using Tab Controls for the entire Database, but referencing controls isn't an issue)



    The command button refreshes the entire database and then makes the control that governs the report visible. I've employed this method before (not with crosstabs) and it works. For the sake of this, this was already set to visible.

    Click image for larger version. 

Name:	1.jpg 
Views:	25 
Size:	183.7 KB 
ID:	19157

    As you can see, the report is built off of a crosstab query with 3 parameters (OE, Year, Quarter).

    Here is an example of how I have my Query set-up in design view for one particular parameter (OE).

    Click image for larger version. 

Name:	2.jpg 
Views:	25 
Size:	136.9 KB 
ID:	19158

    With this set-up, when I open my Crosstab query, I am prompted to input a parameter and the query runs smoothly.

    However, now if I go back to my particular form, nothing gets displayed. As you can see.

    Click image for larger version. 

Name:	3.jpg 
Views:	25 
Size:	50.6 KB 
ID:	19159


    I would think that you should be able to now select your particular parameters (or at least be prompted for one, of which i am not) and then the report should open accordingly when I refresh and make visible. But nothing shows up, the report itself dosen't show up.

    Any thoughts?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Well, with nothing in the combo I would expect an empty report. Have you tried entering an appropriate value in the combo? Presumably you requery the report either behind the button or in the after update event of the combo(s).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    McArthurGDM is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    215
    Even if I put in a parameter, nothing becomes visible. The entire report isnt visible. I can't even see a header or anything.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Do you requery the report after entering the parameter? Is the report in Report view?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    McArthurGDM is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    215
    I "Refresh All" (sendkeys F9) with the macro, this is equivalent to requery. The report is in Report View.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I don't use macros or SendKeys (can be unreliable). I would explicitly requery the report. Can you post the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    McArthurGDM is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    215
    Do you have a personal e-mail, this is a work-related document and I don't want it being spread if possible.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Don't know about Paul, but I don't distribute my e-mail in forums.

    Options:

    1. attach file to thread post - follow instructions at bottom of my post - the attachment can later be deleted

    2. upload file to a fileshare site such as Box.com and post link to file (the link can later be removed from post) or PM a member with the link
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I'll get out of the way.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    McArthurGDM is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    215
    I tried to upload it to the site but I can't compress it below 500kb.

    Do you have a dropbox?

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Reread post 8. Did you fully read the instructions at bottom of my post? 2MB zip file allowed.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #12
    McArthurGDM is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    215
    Attachment 19164

    Hopefully this works.

  13. #13
    McArthurGDM is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    215
    MainNavigation is the way to access the Main form with all its subforms.

    StaffProjections is the particular Form with the Crosstab Query subreport.

    MonthlyProjectionALL sets the stage for MonthlyProjectionALL_Crosstab.

  14. #14
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    This is Navigation control/form. I don't like and don't use.

    The MonthlyProjectionAll_Crosstab query does not have any parameters. I tried to create them and get the same outcome - blank report. Probably because of referencing Navigation form. Review https://www.accessforums.net/forms/t...orm-32053.html

    There is no macro, it is VBA using SendKeys. Macros are very different thing in Access. SearchMain has SendKeys code but that has nothing to do with the projections report.


    The tables in MonthlyProjectionAll are not joined. This results in a Cartesian relation of records. Is this what you want?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    McArthurGDM is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    215
    Yes, I wanted the cartesian product of all these. It would allow me to build the crosstab query I was looking for.

    The fact that you got the same outcome of a blank report entails that the issue lies in the Navigation Control. I've found workarounds for almost everything within Navigation controls except this.

    Ill try using a Macro instead. I used sendkeys because it typically has the same effect of requerying and reloading, etc... but ill try different ways around this.

    If I figure out a solution, I'll post it.

    Thanks for looking at it!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 10-24-2014, 12:15 PM
  2. Replies: 5
    Last Post: 12-04-2012, 02:46 AM
  3. Problem about parameters in query
    By ryantam626 in forum Programming
    Replies: 5
    Last Post: 08-22-2012, 08:06 PM
  4. Replies: 4
    Last Post: 07-27-2012, 07:04 AM
  5. Crosstab Criteria or Parameters
    By lukewarmbeer in forum Access
    Replies: 3
    Last Post: 08-11-2010, 09:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums