Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Posts
    7

    Post Unanswered: combine queries in vb-code and print results in a datasheet

    Hi!

    I've defined several queries in VB-code side of Access2000. Here's the simplified version:
    ------------
    Private Sub cmdDisplayParameters_Click()
    Dim select1 As String
    Dim select2 As String
    Dim select3 As String

    select1 = "SELECT .... FROM Table1"
    select2 = "SELECT .... FROM Table2"
    select3 = "SELECT .... FROM Table3, Table2"
    .
    .
    .
    End Sub
    ------------
    Now I'd like to display the results of both queries in one single datasheet (NOT a list box or anything of that sort). How to do this?

    Why I'm doing this is because I actually have an application with lots of check boxes, so by checking any combination of them and clicking the button the user can retrieve all the desired parameters concerning some object (that has information in several tables) in one single datasheet.

    I'd be grateful for a reply, or a link to a wonderful site where the reply exists (haven't found it myself). Thanks a bunch!!

    Maarit

  2. #2
    Join Date
    May 2002
    Location
    Philadelphia, PA
    Posts
    14
    You could try with a subform (or subreport) for each of your seperate queries, making them visible as necessary.

    tim

  3. #3
    Join Date
    May 2002
    Location
    Chicago
    Posts
    22
    This looks like a job for a query. I am not sure why you could not combine all of your tables in a single query - that would pull any number of fields that you need onto a form.

Posting Permissions

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