Results 1 to 2 of 2

Thread: how to join tables

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2005
    Location
    Pakistan
    Posts
    24

    how to join tables

    i have an access database with about thirty tables, each table have about ten or more coumns or fields. one patient may have different tests from different tables of the database. i am stuck up to generate reports, especially of one patient with tests from different tables and single report with all the test results on it. how can i generate such reports in vb6 and how can i join the tables by sql parametrized queries. please help me.

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: how to join tables

    Read up on joins, specifically left joins.

    Then you would need to list all the patients and left join to the other tables to pull back information.

    Possibly you could have a reports table (temporary?) to hold the data in, then you can run a series of sql statements to fill the table with the data for outputting and run the report off that table.

    Have a look in the database forum section here, I think it is the second or three pinned thread that has info on joins.. mostly accurate info.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

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



Click Here to Expand Forum to Full Width