I'm using a Union qry for the data source of my selection for employees/non employees.
Some are employees and others are not. ONLY employees can get paid with a payroll check.
I use a combo with a value of Payroll/NonPayroll to select from.
If this person is NOT an employee then the selection has to be limited to NonPayroll. Naturally employees would have a sequential number
Ex' John = 1 , Bill =2 , etc ...
For Other Non-Employees the numbering is different. It starts at 0.1 and increments from there.
See the attached screenshots.
I need to figure out a way of telling if the employee is a Non-Employee or not.
Hope this makes sense.
Employee, Non-Employee
-
- 4StarLounger
- Posts: 550
- Joined: 30 Jul 2014, 23:58
Employee, Non-Employee
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78448
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Employee, Non-Employee
I'd add a column in the union query that contains True for employees and False for non-employees.
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 550
- Joined: 30 Jul 2014, 23:58
Re: Employee, Non-Employee
Hmm, interesting. I will see if I can accomplish that.
Thanks for the idea.
Thanks for the idea.
-
- Administrator
- Posts: 78448
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Employee, Non-Employee
It would look like
SELECT ..., True AS IsEmployee
FROM TEmployee
UNION SELECT ..., False
FROM TOther
SELECT ..., True AS IsEmployee
FROM TEmployee
UNION SELECT ..., False
FROM TOther
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 101
- Joined: 22 Feb 2022, 09:04
Re: Employee, Non-Employee
Crossposted at Access Forums
-
- 4StarLounger
- Posts: 550
- Joined: 30 Jul 2014, 23:58
Re: Employee, Non-Employee
Don't need a tattle tale. Wanted to get a different perspective.
-
- Administrator
- Posts: 12604
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Employee, Non-Employee
It's polite to mention when you have cross-posted something. See Rule 9.
Lounge rules wrote: 9. Avoid cross-posting into two or more forums
Cross-posting is the posting of the same or similar messages on more than one forum (for example, posting the same message in both the Access forum and the VB/VBA forum here in the Lounge) or posting the same message here and on other boards (such as OzGrid or Microsoft Community). This can easily lead to confusion and to duplication of information. Please choose the forum that is the most appropriate and post your message there. If you prefer to post the message in multiple boards, please append links to the posts in all boards that contain the duplicate messages. The reason for this is to prevent people wasting their time replying to your question when it has already been answered in another place. Besides good manners and etiquette, it also provides a way to connect the solutions supplied in the various forums for easier reference.
StuartR
-
- 4StarLounger
- Posts: 550
- Joined: 30 Jul 2014, 23:58
Re: Employee, Non-Employee
I understand what it is. I'm not bound by it though. This was a one off and it is not my habit. After this, I will say no more. I did not find a solution to my issue at hand, although a reply was made without me knowing about until later. I don't cater to busybodies that like to police the internet. My apologies if Hans was offended. As far as that other person, no thanks. No good manner lessons needed.
Thanks,
Thanks,
-
- Administrator
- Posts: 78448
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Employee, Non-Employee
I am not offended, but disappointed at your attitude...
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 101
- Joined: 22 Feb 2022, 09:04
Re: Employee, Non-Employee
Just did not want people repeating what had already been offered? Also to be aware of what had been offered.
I can see a lot of what you asked at UA is also here?. Those guys would unlikely be aware of your crossposting here before now?
If you do not like an answer, that is fine, but at least have the courtesy to say you have asked elsewhere and provide a link?
If you had just started out, you could be forgiven, you did not know, newbies seldom do. However you have been on several forums for several years and should know better.
Using Access 2007/2019.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Please, please use code tags when posting code snippets, click the </>icon.
Debug.Print is your lifesaver.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Please, please use code tags when posting code snippets, click the </>icon.
Debug.Print is your lifesaver.