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,431
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: 706
Attached File  Planner.zip ( 198.19K )Number of downloads: 1091
 
Go to the top of the page
 
Peter Hibbs
post Mar 9 2013, 12:14 PM
Post#2


UtterAccess VIP
Posts: 1,431
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,814
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,814
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,431
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,431
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: 290
Attached File  Planner_V2.zip ( 305.08K )Number of downloads: 809
 
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    16th December 2017 - 11:28 PM