Query Window

  • It should be under microsoft common controls... unless it has a new name under access 2k2 (if that's even possible ).

    Other than that I have no idea of how to create that report.

  • Hi Remi

    No, there is definitely no Microsoft Common Tools - or anything like it.  I can't imagine what the problem is.

    Thanks for trying - this is very much appreciated.

    Paul

  • K... good luck.

    The only other solution I can see is to write some sort of html page and load it in an explorer window in the program (might run into the same ocx problem with that one too).

  • Am I missing the point here? you could create a fixed size form, ensure that the border size is set to thin (therefore not alterable in size) and then add in a subform based on the query???

    there should be no need for a list view or common controls.

    if you neeed to change the SQL of the query then you can alter the querydef via vbscript when you click the button.

    MVDBA

  • What about ...

    1) Create the crosstab query as usual.

    2) Create a Datasheet-view form which uses the crosstab query as its data source.

    3) When choosing which fields from the query to include on the form, use the wild-card to get them all, rather than selecting all the individual fields.

    4) Edit the form's Format properties (width, etc.) to make it appear the way you want it on-screen.

    5) Have the user-clickable command button open the form in Normal mode.  Invoking a form bound to a query will cause the query to re-run and refresh itself.

    Step 3 should solve the "changing number of columns" problem.

    Steps 2 & 4 should work around the "re-size the query window" problem by making the object of concern be a form rather than a query.

    It's been a while since I've worked very intensely with Access, so I may have missed some details.  Nonetheless, best of luck ...

  • Thanks, everybody.

    The problem I have been trying to get around is that the obvious (and excellent) idea that you can have a form automatically add a column from a select * from query doesn't appear to work in Access.  Once you have created the form, you are stuck with the number of fields at that point in time - unless you go through the process of coding the form to add the new fields.

    What I wanted was a quick and easy way of showing the results of a crosstab query on a sudden demand basis.

    Thanks again

    Paul

  • Paul,

    If what you need is

    >>

    What I wanted was a quick and easy way of showing the results of a crosstab query on a sudden demand basis.

    <<

    then with Querydef.Open you can show the query results on demand and will get you the "new" possible fields. What You said before about controling screen coordinates of it is not possible without some API calls !! Because of that I said that if you need that level of control you will have to deal with a form or a report and some coding in it

    And yes you are correct select * will save on the form the metadata for which it was run when the form or whatever  else was in design mode. After that it does not get updated!

       cheers!

     


    * Noel

  • Thanks,  Noel

    I should get a chance later today to try this.  Hope I can get back to you if I get into difficulties.

    Thanks again

    Paul

  • If you want to get the Common controls in the reference when it is not showing, you just need to hit the browse button and then navigate to where the mscomctl.ocx is and select it. That should add it to the references list.

Viewing 9 posts - 16 through 23 (of 23 total)

You must be logged in to reply to this topic. Login to reply