Query problem

Hi experts,
I have a query question.  I have a database for employee time attendance.  I have a field call "Leave" for VL(vacation leave), SL(sick Leave) such.   sometimes employee would like to take half day of sick to vacation.  so we store in the table as VL, SL, 1/2 SL pm, 1/2 VL am, AWOP etc.  I would like to have a query to pull all employees leave by date but only show 1/2 am or 1/2 pm instead 1/2 SL PM or 1/2 VL am.  is this possible?
The pm, it store under the field Time not under the field Leave.  so it combine with Leave & Time for VL, 1/2 VL Am like that

here is my query but it shows all not part of them
Expr1: [Leave] & " " & [Time]  -  result is 1/2 VL am, 1/2 SL PM
Expr2: Left(Trim([Leave]),Len(Trim([Leave])))  it came out same result as the Expr1

Thanks
urjudoAsked:
Who is Participating?
 
PatHartmanCommented:
The problem is caused by storing multiple pieces of information in a single field.  Do you really allow people to only us vacation in 1/2 day increments?  Does it really matter whether the time is am or pm?

Try this?
Expr1: Left([Leave],3) & " " & [Time]

Assuming your WHERE clause only selectsthe 1/2 SL and 1/2 VL values, you can just show the first three characters.
0
 
urjudoAuthor Commented:
Thanks.
0
 
PatHartmanCommented:
You're welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.