Employee Attendance

oxicottin

Learning by pecking away....
Local time
Today, 04:52
Joined
Jun 26, 2007
Messages
891
Hello, I am trying to make an employee attendance log and am having trouble with everything. I made a sample database "Attached". What I want to do is have the two forms "Criteria selection" and "View Schedule" on one form and when an employee is selected from the Criteria selection form it would auto requery the View Schedule form. I cant seem to put them both on the same form without errors due to querys in the forms VBA. Any help would be appreciated. I have very little knowledge of VBA so please explain :p....
I am also woundering if I can change the form "View Schedule" that would show the year as a calendar insted of a month at a time?

Thanks!

(Oh select any date in Oct. and employee Chad Z this is the only info in the Test DB)
 

Attachments

Last edited:
Attaching a database that is Read Only is pretty much useless if you want anyone to help you!
 
Attaching a database that is Read Only is pretty much useless if you want anyone to help you!

I dont know why it would be read only? It works for me.... Anyway I deleted the other one and re-uploaded another copy. Thanks!
 
Add "View Schedule" as a subform to "criteria selection" form

In the "view Scedule" form add

Code:
Public Sub Refresh1()
Dim x As Single

' Tells the form what month you selected from the form "Criteria Selections" text box "SelectedDate"
dispMonth = Forms![Criteria selection].[SelectedDate]

'if first day of week is other than Sunday, set day here
    FirstDay = 1  'Sun=1, Mon=2, Tue=3, Wed=4, Thu=5, Fri=6, Sat=7
    For i = 1 To 7
'Gives you the Sun Mon Tue Wed Thu Fri Sat at top of calendar
       Me("H" & i).Caption = Left(Format(FirstDay - 1 + i, "ddd"), 3)
    Next i
'display current month
    Me.MonthTitle.Caption = Format(dispMonth, "mmmm yyyy")
    DisplayMonthRep
    Me.DispDate = Date
End Sub

The code then needs to be called from the "View Schedule" button

Code:
  Exit Sub
Else
 Call Me.[View Schedule].Form.Refresh1
Exit_OpenSchedule_Click:

As for changing the calander view from monthly to yearly i would sugest that you search for another calander.

Hope this helps.

Garry
 
Zigzag, what kinda calendar do you suggest?

Thanks,
Chad
 

Users who are viewing this thread

Back
Top Bottom