Results 1 to 6 of 6
  1. #1
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28

    Add a table to an existing query

    I have a query made up of a set of tables that are used on a form. I have created a combo box and it's values are populated by a table. I want to add the table to the existing query but Access 2013 responds that a query cannot be performed with unrelated tables.

    Existing query elements:

    ID_ Table = ID


    Herd_ Table = HerdLookup
    Name_ Table = NameLookup
    Color_ Table = ColorLookup
    and so on ..........

    Each of the elements are a table joined together.

    I am attempting to add a new table:

    BandLookup

    This table is not bound to the query but I want it to be.

    I have created the combo box on the form.


    Any help would be greatly appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    A form can do data entry/edit for only 1 table. Why are you including the lookup tables in the form RecordSource? Are you using INNER join (don't).

    What do you mean by 'table is not bound to the query' - tables are in a query, forms are bound to query.
    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.

  3. #3
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28
    I solved the problem of the combo box creation but now I am allowed to enter data into it from a lookup field but all other combo boxes that are currently blank will not allow data entry. Combo boxes that do have current data can be changed. I get the error:
    "cannot enter value into blank field on "one" side of outer join.
    Any ideas are appreciated .............

  4. #4
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28
    I forgot to include the query. The file I added is the Bands file.

    SELECT IDs.ID AS ID_, Herd.Herd AS Herd_, Sex.Sex AS Sex_, Color.Color AS Color_, LFLeg.LFLeg AS LFLeg_, RFLeg.RFLeg AS RFLeg_, LHLeg.LHLeg AS LHLeg_, RHLeg.RHLeg AS RHLeg_, Parents.DameID AS DameID_, Parents.DameAuthority AS DameAuthority_, Parents.SireID AS SireID_, Parents.SireAuthority AS SireAuthority_, Notes.Notes AS Notes_, OtherMarkingsComments.OMComment AS OMComment_, Notes.DiversionaryFeeding, Bands.Bands
    FROM ((((((((((IDs LEFT JOIN Bands ON IDs.ID = Bands.ID) LEFT JOIN Color ON IDs.ID = Color.ID) LEFT JOIN Herd ON IDs.ID = Herd.ID) LEFT JOIN LFLeg ON IDs.ID = LFLeg.ID) LEFT JOIN LHLeg ON IDs.ID = LHLeg.ID) LEFT JOIN Notes ON IDs.ID = Notes.ID) LEFT JOIN OtherMarkingsComments ON IDs.ID = OtherMarkingsComments.ID) LEFT JOIN Parents ON IDs.ID = Parents.FoalID) LEFT JOIN RFLeg ON IDs.ID = RFLeg.ID) LEFT JOIN RHLeg ON IDs.ID = RHLeg.ID) LEFT JOIN Sex ON IDs.ID = Sex.ID;

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Didn't answer my question. Why are you including lookup tables in the form RecordSource?

    Are you binding comboboxes to fields from the lookup tables - don't do that.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

  6. #6
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28
    I have solved the problem. I was connecting the Bands table key to the main key instead of the other way around. Problem solved.

    Thank you for your help.

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

Similar Threads

  1. Replies: 4
    Last Post: 12-11-2013, 02:15 PM
  2. Replies: 5
    Last Post: 08-22-2013, 04:32 PM
  3. Replies: 3
    Last Post: 02-05-2013, 07:47 AM
  4. Replies: 3
    Last Post: 08-07-2012, 03:48 PM
  5. Replies: 7
    Last Post: 02-06-2012, 11:54 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