Results 1 to 8 of 8
  1. #1
    usfarang is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2021
    Posts
    42

    Union Query Dilemma

    I use a union query as the record source to select a employee type. They are either an employee or a non-employee. I also use a combo to select the type of payroll, i.e. Payroll or Non-Payroll.
    If the employee type is Non-Employee then I don't want them to be able to issue a payroll check, just a miscellaneous check.
    The combo to select an employee type uses the union query so you get both types. I am attaching some screenshots that hopefully will help.
    Hope this makes sense.

    Thanks,
    Attached Thumbnails Attached Thumbnails TOthers.png   QPayee.png  

  2. #2
    usfarang is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2021
    Posts
    42
    Not sure how to address this. I know I need to add something like a true false field to the union query but I decided on a different route. It was setup this way many years ago and I'm reworking it.
    I will just add another table tblEmployeeType and go from there. However if anyone knows of an easy fix, please leave a comment.

    Thanks,

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    And the question is?
    Why the need for a union query? Surely a status in the Personnel file (called Employee) would be better?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Why choose both types in the combo? Why not a option for Select Employees OR Select NonEmployees; then use the response to populate the combo as appropriate.

  5. #5
    usfarang is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2021
    Posts
    42
    As I said, this was an old db that I was re-working. It was setup that way. Thanks for the suggestions. Like I said, I went with just a simple combo, employee/non employee selection. Not that a union query was a bad option, just difficult to implement in some cases.
    Thanks

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    usfarang is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2021
    Posts
    42
    Yes I did post there first and did not get a workable solution and although it is NOT my custom and was a one off, I make no apologies. A post was made before I could come back and view it although it was not workable for me.
    Not here to waste anyone's time but things happen sometimes. I made an apology to the replier and this is finished in my book.
    Have a Good Day.

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Glad you have resolved your issue.

    No one is asking for an apology. The forum participants (this forum and others) generally follow this etiquette when cross-posting:
    - indicate that they have posted in one or more forums,
    - identify the url(s) of the cross post(s),
    - reply in the cross post(s) if a solution has been found.

    Crossposters are often directed to this Excelguru reference for guidance/enlightenment and rationale.

    For example, in this forum https://www.accessforums.net/showthr...ight=excelguru

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

Similar Threads

  1. VAT dilemma
    By neilsolaris in forum Access
    Replies: 15
    Last Post: 02-22-2021, 07:36 AM
  2. Replies: 4
    Last Post: 08-09-2017, 12:06 PM
  3. Convert Union Query to non-union help
    By Ekhart in forum Queries
    Replies: 2
    Last Post: 01-10-2017, 03:39 AM
  4. DB Setup and Reporting Dilemma HELP!
    By gibsonmurphy in forum Access
    Replies: 3
    Last Post: 03-10-2014, 11:08 AM
  5. Relationship Dilemma? I think??
    By Palomino33 in forum Access
    Replies: 17
    Last Post: 10-06-2011, 08:52 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