Results 1 to 2 of 2
  1. #1
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    stuck on an inner join query with distint and union

    i am certain that i have been able to do this prior, so i apologize in advance, but this time (haven 'taken a break from it' SEVERAL TIME) I am still stuck



    in its simplest, i have a single form, with a continuous subform, having only a combobox

    the combo box displays notes that have been selected, from 'some other table', for the current record, and allows data entry of additional notes (from it's drop down.) the record source ought to list all records in the table Tag_NotesRefs (list of all notes used for all records in the table Tags) that have not been used in record current at form1

    it also ought to include the (union) the sole record in table Notes_addl, which will offer a prompt to get notes (through a pop-up form) from a 'some other table' in a linked MDb.

    I have spun around on this so many times, I'm not even certain how to ask, and I KNOW that i have not explained this well at all, but i think (I hope) you'll get the jest from the attached...

    ANY help will be greatly appreciated in advance,
    markSTUCK_2022.06.07.zip

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,963
    Neither form RecordSource nor combobox RowSource reference "[some other table]" so why do you say "the combo box displays notes that have been selected, from 'some other table', for the current record"? Nothing is displaying data from "[some other table]".

    "the record source ought to list all records" - did you mean "row source"?

    Relationships are not clear to me. What is destination table and what is lookup table?

    Possibly you need something like:
    SELECT field1, field2, field3 FROM sometable WHERE ID NOT IN (SELECT ID_FK FROM othertable WHERE somefield = somevalue)
    UNION SELECT 0, 999, "
    < add additional notes from the MDb >" FROM sometable
    ORDER BY field1;

    I don't get the gist nor do I think you jest.

    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.

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

Similar Threads

  1. SQL Join and Union query on the same table
    By waterpower in forum Queries
    Replies: 3
    Last Post: 01-23-2021, 11:28 AM
  2. Inner Join in Union Query
    By RAJESHKUMAR R in forum Queries
    Replies: 1
    Last Post: 02-25-2018, 12:36 AM
  3. Replies: 2
    Last Post: 09-14-2017, 06:02 AM
  4. Union query (or Inner/Outer join?)
    By LilMissAttack in forum Queries
    Replies: 4
    Last Post: 10-23-2010, 12:36 AM
  5. Stuck on Join Query
    By Pimped in forum Queries
    Replies: 1
    Last Post: 10-26-2009, 10: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