Results 1 to 4 of 4
  1. #1
    syah96 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2013
    Posts
    2

    Unhappy Quaries Multiple table + Null Problem


    Hello
    Here the thing, i got multiple table where it share one similar field which (1 to 1 relationship). All the table connect to staff profile table where sharing the staff ID. The table content different record. What i want to do is to make a query( or any other way) to display all records in all table through the staff ID. However the problem is some of the table may not contain some of staff record.
    Can someone help me..

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,738
    I don't understand your post.
    ???
    All the table connect to staff profile table where sharing the staff ID
    .????
    Please show your table design and a few records.

  3. #3
    syah96 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2013
    Posts
    2
    Click image for larger version. 

Name:	relate.jpg 
Views:	5 
Size:	123.7 KB 
ID:	10840
    The relation like this. I cant upload the file since it too big. Well, the staff form relate to all table where in query i want all the table show their data based on staff ID. But, some table not necessarily to have data.

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Why do you have multiple tables with the same field names. This does not seem to be a normalized state for your db. If your tables are for departments, then I think you could combine them into one table with a field identifying the department. I don't believe your current design is the most efficient.

    To answer your question, you would design your query in this manner
    Code:
    Select Staff.*,tblInv.*
    From Staff LEFT join tblInv on Staff.[No Staff]= tblInv.[Nama];
    I have only done this for joining two tables. The Left join will give you all data in the Staff table and only data from the tblInv where data exists. If you were to join all the tables, this would be your format. I would urge you however to change the design of your database and it will make queries easier to manipulate in the future.

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

Similar Threads

  1. Dlookup problem - Invalid use of Null
    By chuki2 in forum Programming
    Replies: 1
    Last Post: 07-18-2012, 10:36 PM
  2. Is Not Null...Multiple fields
    By msk7777 in forum Access
    Replies: 13
    Last Post: 11-17-2011, 02:52 PM
  3. Problem checking for Null Value of a Textbox.
    By SIGMA248 in forum Programming
    Replies: 3
    Last Post: 08-09-2010, 08:56 AM
  4. Null Date control code problem
    By DanW in forum Forms
    Replies: 2
    Last Post: 11-10-2009, 03:13 PM
  5. Is null problem
    By rockape in forum Programming
    Replies: 5
    Last Post: 09-29-2009, 12:46 PM

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