Employee, Non-Employee

User avatar
burrina
4StarLounger
Posts: 550
Joined: 30 Jul 2014, 23:58

Employee, Non-Employee

Post by burrina »

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.
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Employee, Non-Employee

Post by HansV »

I'd add a column in the union query that contains True for employees and False for non-employees.
Best wishes,
Hans

User avatar
burrina
4StarLounger
Posts: 550
Joined: 30 Jul 2014, 23:58

Re: Employee, Non-Employee

Post by burrina »

Hmm, interesting. I will see if I can accomplish that.
Thanks for the idea.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Employee, Non-Employee

Post by HansV »

It would look like

SELECT ..., True AS IsEmployee
FROM TEmployee
UNION SELECT ..., False
FROM TOther
Best wishes,
Hans

User avatar
Gasman
StarLounger
Posts: 97
Joined: 22 Feb 2022, 09:04

Re: Employee, Non-Employee

Post by Gasman »

Crossposted at Access Forums

User avatar
burrina
4StarLounger
Posts: 550
Joined: 30 Jul 2014, 23:58

Re: Employee, Non-Employee

Post by burrina »

Don't need a tattle tale. Wanted to get a different perspective.

User avatar
StuartR
Administrator
Posts: 12601
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Employee, Non-Employee

Post by StuartR »

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


User avatar
burrina
4StarLounger
Posts: 550
Joined: 30 Jul 2014, 23:58

Re: Employee, Non-Employee

Post by burrina »

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,

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Employee, Non-Employee

Post by HansV »

I am not offended, but disappointed at your attitude...
Best wishes,
Hans

User avatar
Gasman
StarLounger
Posts: 97
Joined: 22 Feb 2022, 09:04

Re: Employee, Non-Employee

Post by Gasman »

burrina wrote:
23 Feb 2022, 09:39
Don't need a tattle tale. Wanted to get a different perspective.
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.