UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Holiday Planner Demo, Access 2003    
 
   
Peter Hibbs
post Mar 8 2013, 12:12 PM
Post#1


UtterAccess VIP
Posts: 1,589
Joined: 17-June 10
From: Dorset. UK.


This demo database shows a method for programming holiday dates for a company but it could, of course, be used for any sort of time scheduling.
The form is set up in a similar way to a standard Gantt chart with a list of employees and a four week period which shows lines against the relevant dates (see screen shot).
The basic facilities are :-
Add new employees to the chart or delete employees.
Add a holiday period by clicking the start date cell and dragging the mouse cursor across to the end date to draw the line.
Add a holiday period by double clicking a cell and entering dates in pop up form.
Edit a holiday period by clicking on a line to show a pop up editor form.
Edit an employee record by clicking on an employee name to show a pop up employee editor form.
Add Public Holiday dates manually or automatically and show them in different colors.
There is also a .pdf file which shows how to use the database and how to change some facilities.
The basic method described in the document can also be used to show data in a format which is not easy to do using the standard Access forms.
The demo database works with A2002 or later.
Peter Hibbs.
Attached File(s)
Attached File  Planner_Pic.png ( 48.71K )Number of downloads: 763
Attached File  Planner.zip ( 198.19K )Number of downloads: 1186
 
Go to the top of the page
 
Peter Hibbs
post Mar 9 2013, 12:14 PM
Post#2


UtterAccess VIP
Posts: 1,589
Joined: 17-June 10
From: Dorset. UK.


Hi Daniel,
Thanks for the kind comments.
OChuck,
:welcome:
Color coding individual 'cells' could probably be done (although I haven't tried it on this project) but it would be quite complicated. You could probably do it with Conditional Formatting, depending on how many colors you want and which version of Office you are using. If you need lots of colors and you are using a version earlier than A2010 then this Multiple Color Demo might help.
As far as showing the Notes in the Tool Tip flag, that is going to be tricky. I had already thought about that myself and the problem is that with the MouseMove event of the hidden button control, you only have the X and Y mouse co-ordinates available to determine where the mouse pointer is at any time. The X co-ordinate is no problem because it easy to calculate which column the mouse is on, the problem is determining which row the mouse is on so that you can fetch the data for the correct employee. The Y co-ordinate only gives the vertical position of the current record and NOT all the records so you can't use that to find the row number. If you, or anyone else, knows of any way to find the row number from the Y parameter of the MouseMove event then it could probably be done quite easily. The only method I can think of (and this is really complicated) is to use an API call to determine the mouse position on screen and then try and relate that to the form-subform position to calculate the offset from the first row. Also, if you happen to have more than 29 employees and the subform has scrolled down a bit, then this is going to get really really complicated. If you have any thoughts on this I would be interested to hear them, sorry I can't give you a more positive suggestion.
Anyway, let us know how you get on if you should make those changes, it could be useful to other developers.
Peter.
Go to the top of the page
 
jleach
post Mar 17 2013, 03:24 PM
Post#3


UtterAccess Editor
Posts: 9,934
Joined: 7-December 09
From: Staten Island, NY, USA


Hi Peter, et al;
A few months back there was a good discussion about how to get the row position using MouseMove, and we never did come up with a good way. The best thing that we were able to figure on was, as you said, using the WinAPI and the form/sub positions and try to backfigure. Likewise, we figured that'd be ok - not too terribly bad - but throwing a scrollbar in the mix was the real dealbreaker. Stephen Lebans has some code at his site that attempts this, which may get us, generally speaking, within a few pixels perhaps in most cases. However, the because we're working with an result that's subject to accumulated error in the record calculation, the more records there are, the greater that window of errors become, so if there's 20 extra records things might be ok, but if there's 2000 extra scrollable records, a 2 pixel miscalculation because of a border width could put us 2 inches off our actual location.
All in all, not a reliable solution. Very difficult.
Cheers,
Go to the top of the page
 
jleach
post Mar 17 2013, 03:32 PM
Post#4


UtterAccess Editor
Posts: 9,934
Joined: 7-December 09
From: Staten Island, NY, USA


Although, now, it occurs to me that if we know the size of the displayed record in height and the size of the container, we can limit the underlying set to the number of controls that'd fit. This would cut back on problems with accumulated errors, though it'd require a somewhat extensive custom implementation of scrolling. Not ideal, but if one really wanted to, maybe that'd at least be feasible.
Cheers,
Go to the top of the page
 
Peter Hibbs
post Mar 17 2013, 05:55 PM
Post#5


UtterAccess VIP
Posts: 1,589
Joined: 17-June 10
From: Dorset. UK.


Hi Jack,
Yes, coincidentally I came across the A2KConditionalFormattingVer27.mdb demo from Stephen today while researching another project but as you say, it would require a lot of programming to implement the ToolTips facility using his code (which looks quite complicated). Another possible problem is that the response times in the demo seem quite slow and combined with the ToolTip delay which can also be quite slow I really wonder whether it would be practicable and whether it is worth all the effort. Maybe someone will have a go and let us know (but I'm not holding my breath!).
Cheers,
Peter.
Go to the top of the page
 
Peter Hibbs
post Mar 28 2014, 01:49 PM
Post#6


UtterAccess VIP
Posts: 1,589
Joined: 17-June 10
From: Dorset. UK.


The attached A2003 database demo is version 2 of the Holiday Planner above. This version has the option to use multiple holiday types with a different color for each type (see screen shot below). A pdf file includes instructions on how to use it and modify it for your own projects.
eter Hibbs.
Attached File(s)
Attached File  Leave_Planner.png ( 49.21K )Number of downloads: 343
Attached File  Planner_V2.zip ( 305.08K )Number of downloads: 944
 
Go to the top of the page
 
pctechdr
post Sep 12 2018, 07:15 AM
Post#7



Posts: 8
Joined: 19-June 17



Hallo m8,

i'm trying to intergrate your perfect program in SQL Server with 500+ persons (not only for Holidays) but with OLE OBJECTS the speed is very very very slow.
I have a question!!!

How can i copy only the Color from Holiday and not the image and then how can i show it in to program!

Thanks in advance!!!
Go to the top of the page
 
Peter Hibbs
post Sep 12 2018, 10:10 AM
Post#8


UtterAccess VIP
Posts: 1,589
Joined: 17-June 10
From: Dorset. UK.


Hi pctechdr,

I am afraid I don't know anything about SQL Server so I can't help with that. Since the colors are part of the image I don't think there is any way to show the colors without the image.

How do you know that it is the OLE OBJECT fields that are slowing things down?

Have you tried Version 1 above (which does not use OLE OBJECTS) to see if that is any quicker?

If it is the OLE OBJECT fields that are the problem I can only suggest that you investigate this in relation to SQL SERVER to see if there is any way to speed things up or if there is any other alternative.

Sorry I can't be of more help but this is not something I have come across before.

Good luck with the program.

Peter.
Go to the top of the page
 
pctechdr
post Sep 12 2018, 11:14 AM
Post#9



Posts: 8
Joined: 19-June 17



Thank you for the answer,

Ι will try the first version though I can not choose a different color for different type of holiday to see if is this faster!
thumbup.gif
Go to the top of the page
 
mrcunknown
post Sep 22 2018, 07:42 AM
Post#10



Posts: 3
Joined: 22-September 18



Hi all,

I'm using my planner in excel at this moment. This works good for me, but the plan is that multiple teamleads also goining to make plans .... and that [censored] is more people work in 1 excel file.I like this access planner alot and im thinking to use this planner. Is it possible to build it that i can see how many fte are in one shift. shift 1, shift 2, shift 3

if put a example here.
Attached File(s)
Attached File  excel.JPG ( 178.86K )Number of downloads: 13
 
Go to the top of the page
 
Peter Hibbs
post Sep 22 2018, 09:38 AM
Post#11


UtterAccess VIP
Posts: 1,589
Joined: 17-June 10
From: Dorset. UK.


Hi mrcunknown,

welcome2UA.gif

It is not clear to me what you want to display on the form, can you explain in more detail.

I am guessing that you have a number of people that do shifts at work and you are displaying coloured lines for each shift but what exactly are you trying to count (what is fte) and what do the characters a, b, c and ziek, etc mean.

More information needed please.

Peter Hibbs.
Go to the top of the page
 
mrcunknown
post Sep 22 2018, 01:27 PM
Post#12



Posts: 3
Joined: 22-September 18



Hi,

Sorry for my poor explanation :-).

A, B and C represents shift 1, 2 and 3. ziek = sick. What i would like is indeed that under we can see how many employees there is in one of those shifts (sick, free, training must not be counted).Purpes would be that we easily can see if the shifts are evenly divided.

The most ideal is that we can see the amount of employees by department.
Go to the top of the page
 
Peter Hibbs
post Sep 22 2018, 04:49 PM
Post#13


UtterAccess VIP
Posts: 1,589
Joined: 17-June 10
From: Dorset. UK.


Hi,

So what you are saying is that for each day you want to show a count of the number of people that are working on each shift for that day and display the count at the bottom of the chart. If so, I guess it could be done, it may need some VBA code to do the calculations or maybe a query but it should be possible although it may get a bit complicated. You could add some more rows to the table tblWeekData to show that data on the chart but you would need to add some code to the UpdateChart sub-routine in modGeneral to implement that facility.

Sorry that I don't have the time to help you myself but good luck with the project anyway.

Peter Hibbs.
Go to the top of the page
 
pctechdr
post Oct 2 2018, 02:29 AM
Post#14



Posts: 8
Joined: 19-June 17



Hi,
that is exactly the project that i'm working on.
As Peter said, you have to import the fields that you want in table "tblWeekData"
and then in the "modGeneral", "Public Sub Initialise()" you have to write the code to update this fields.
After that you can make filters in the main form for swifts, persons, sick etc. and you can also count how many are sick, holiday etc.
Attached File  test.JPG ( 425.11K )Number of downloads: 29






Go to the top of the page
 
Peter Hibbs
post Oct 2 2018, 03:50 AM
Post#15


UtterAccess VIP
Posts: 1,589
Joined: 17-June 10
From: Dorset. UK.


Hi pctechdr,

OK, very impressive.

I see you had a problem earlier with the slow speed of this demo using SQL Server, did you manage to fix that problem and if so, what did you do to correct it?

Peter.
Go to the top of the page
 
pctechdr
post Oct 2 2018, 04:01 AM
Post#16



Posts: 8
Joined: 19-June 17



Oh yes,
i forgot to reply and i'm sorry about that!!

The solution!!

I have only the tblHolidayDates & tblPublicHols in SQL (BE)
and the tblWeekData & tblHolidayTypes in the (FE)

So the speed is optimal with the pictures.

Regards!!

Chris
Go to the top of the page
 
mrcunknown
post Oct 21 2018, 02:31 AM
Post#17



Posts: 3
Joined: 22-September 18



Thnx for youre informations and explenations. I will try if i can manag that ... but i'm not so experiansed in writing code.

@pctechdr maybe i can see a demo how you fixed it? confused.gif
Go to the top of the page
 
pctechdr
post Yesterday, 12:38 AM
Post#18



Posts: 8
Joined: 19-June 17



Attached File  Demo_Planner.zip ( 137.45K )Number of downloads: 9
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    23rd October 2018 - 09:55 AM