Calendar for different dept to record annual leave and view others

S

shivv

Can anyone give me some ideas for creating a small database to record annual
leave for members of the same department, but in different groups (about 30
people). Basically so that dates can be blocked out, the user should log in
enter a start date and end date. Then a calendar produced. I create small
access databases.
 
J

James A. Fortune

shivv said:
Can anyone give me some ideas for creating a small database to record annual
leave for members of the same department, but in different groups (about 30
people). Basically so that dates can be blocked out, the user should log in
enter a start date and end date. Then a calendar produced. I create small
access databases.

Try:

http://groups.google.com/group/comp.databases.ms-access/msg/fc60d465226de215

Take out the holiday options and put the table with the dates in the
backend. Add a new field containing the employeeID to that table
(foreign key). Add a LoginName field to the employee table. I use a
module function such as the following to get the LoginName:

'begin module code
Declare Function sGetUserName Lib "advapi32.dll" Alias "GetUserNameA" ( _
ByVal lpBuffer As String, _
ByRef nSize As Long) As Long

Public Function GetUserName() As String
Dim strName As String
Dim lngResult As Long

strName = String(100, 0)
lngResult = sGetUserName(strName, 100)
GetUserName = Left$(strName, InStr(1, strName, Chr$(0)) - 1)
End Function
'end module code


The LoginName can be used to get the employeeID from the employee table
if it contains the LoginName field. That employeeID can be used in a
query to obtain just the dates and annotations for that employee. Maybe
one of the many capable volunteers here can help you with the SQL
specifics. It would even be possible to put a color bar at selected
dates instead or have various colors indicate different things.

James A. Fortune
(e-mail address removed)

Note: I might not be able to answer questions promptly because,
ironically, I am on vacation until June 1. I am using GoToMyPC from
Boulder City, NV to remote to my office computer and expect to be in
California soon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top