Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Putting data under the correct label

Status
Not open for further replies.

retiring

MIS
Jul 3, 2002
35
US
Hello, here is my senerio: I have a database that is to be used for employee scheduling. I want to create a report that shows employee time by day, month, and year and time usage. For example, sick leave, vacation, scheduled. I have a lookup table for types of time usage. The user enters the time type from a combo box on an entry form. The report is based on a query. The problem I am having is putting hours in the correct time category.

Annette Towner
2002 Day Vac. Sick Comp. Time Unpaid Leave Floating Holiday
5
1 8.00
9 1.00
10 3.00
13 3.00

In the above May 1 and 9 should line up under the vac label and 10 and 13 under the sick label.

In my query I tried to accomplish this by creating an expression as follows: Expr4: DLookUp("[Total Hours]","[Leave Request]","
Code:
 = 'vacation'")  When I run the query this column is blank.

Any help would be greatly appreciated.  

P.S.  A double star for anyone who can tell me how to convert the 5 into May.
 
One way...

Public Function GetMonth(intMon as integer)as string

Select case intMon
Case 1
getMonth = "January"
Case 2
getMonth = "February"
Case ...

End Select
End Function

Now just call the function when ever where ever you want send the integer value get back the month. Write it once use it many times.

Good Luck ssecca
 
As to the original problem try this...

Create an unbound text box under each column heading in the detail section of the report. In addition within the detail section include the time value and the type of time field as hidden fields. Within each of the unbound text boxes create a control source simalar to this...

=iif([type]="vac",[TimeVal],"")

Type = the value in the hidden "type of time field"
TimeVal = the value in the hidden "Time field"

Hope this helps
Good Luck
ssecca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top