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

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
6 Pages V < 1 2 3 4 > »   (Go to first unread post)
   Reply to this topicStart new topic
> Holiday Planner Demo, Access 2003    
 
   
pctechdr
post Oct 29 2018, 12:44 AM
Post#21



Posts: 10
Joined: 19-June 17



Why are you not creating your report from tblHolidayDates ?? You have all information there.
Just a thought!

Chris.
Go to the top of the page
 
mrcunknown
post Nov 2 2018, 03:12 AM
Post#22



Posts: 32
Joined: 22-September 18



Thnx :-) ..... I did not check that, but indeed all information is there.

Is it also possible to get a dropdown that i can select which department i want to dislpay in frmHolidays. exp; i have 7 diffrent departments but i only want to see dept #2. I have tryed something to change in qryHoliday but i dont know how to make it in form Holidays.


Attached File(s)
Attached File  Knipsel.JPG ( 56.51K )Number of downloads: 11
 
Go to the top of the page
 
mrcunknown
post Nov 2 2018, 10:10 AM
Post#23



Posts: 32
Joined: 22-September 18



Enclosed my file ... i hope there somebody who can help me :-)
This post has been edited by mrcunknown: Nov 2 2018, 10:12 AM
Attached File(s)
Attached File  test.zip ( 1.35MB )Number of downloads: 49
 
Go to the top of the page
 
Peter Hibbs
post Nov 2 2018, 11:59 AM
Post#24


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


Hi,

Does this do what you want?

Peter Hibbs.
Attached File(s)
Attached File  ROOSTER_Planner_V2_Werkbestand.zip ( 244.05K )Number of downloads: 91
 
Go to the top of the page
 
mrcunknown
post Nov 2 2018, 12:20 PM
Post#25



Posts: 32
Joined: 22-September 18



Hi Peter, Not completely...... I think its beter wen i select a department the other departments disappears. and it wil also be nice to have a overview of al departments went there is no selection. i really appreciate youre help
Go to the top of the page
 
Peter Hibbs
post Nov 2 2018, 02:06 PM
Post#26


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


OK, try this then :-

Copy the text below into the Row Source property of the combo box cmbPName and also change the Default Value property of the same combo box to "*"

SELECT tblDepartments.DeptRef, tblDepartments.DeptName FROM tblDepartments UNION SELECT "*", "<< ALL DEPTS >>" FROM tblDepartments
ORDER BY tblDepartments.DeptName;


What happens now is that when the form opens the chart will show all departments and the Combo box will display '<< ALL DEPTS >>'. You can then select one of the departments in the Combo box to show just the records for that department.

Is this what you wanted?

By the way, you have a few 'Compile' errors which you should fix first because they may mask other more important errors. Also, I remmed out some code in the UpdateChart routine while I was testing, if you are using the Public Holidays facility you will need to un-rem those few lines. If you are not using this facility then I would suggest you leave them out as it will speed up the display a little bit.

Peter Hibbs.
Go to the top of the page
 
mrcunknown
post Nov 2 2018, 02:33 PM
Post#27



Posts: 32
Joined: 22-September 18



Cool .... thats partally what i need :-) I also mean when i select a department that also the names from different departments wil disappear.

What do you mean with 'Compile' errors? My plan is to make use of the Public Holidays facility .... so i have to fix some lines?

Sorry for the dumb questions :-) hahah
Go to the top of the page
 
Peter Hibbs
post Nov 2 2018, 04:13 PM
Post#28


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


Hi,

I also mean when i select a department that also the names from different departments wil disappear.

Sorry, I do not understand what you mean, what names from what departments should disappear? Please explain in more detail.

What do you mean with 'Compile' errors?
You should compile the VBA code to locate any errors in the code. To do this, open any VBA code window and click on the Debug -> Compile Holiday Planner V2 on the menu bar at the top of the window. I don't have time to explain what this does in detail but you can probably search the Internet for more information.

My plan is to make use of the Public Holidays facility .... so i have to fix some lines?
OK, just open the VBA window for module modGeneral , scroll down to the UpdateChart routine and remove the single quotes from the beginning of the six lines after the comment 'Highlight public holidays in selected colors

As a matter of interest what language are you using and in which country?

It is late here so I will have a look again tomorrow.

Peter.
Go to the top of the page
 
mrcunknown
post Nov 3 2018, 02:13 AM
Post#29



Posts: 32
Joined: 22-September 18




I also mean when i select a department that also the names from different departments wil disappear.
Sorry, I do not understand what you mean, what names from what departments should disappear? Please explain in more detail.
I have uploaded 2 screenshots (made it with photoshop to illustrate what i mean)

What do you mean with 'Compile' errors?
You should compile the VBA code to locate any errors in the code. To do this, open any VBA code window and click on the Debug -> Compile Holiday Planner V2 on the menu bar at the top of the window. I don't have time to explain what this does in detail but you can probably search the Internet for more information.
I will try to figure that out

My plan is to make use of the Public Holidays facility .... so i have to fix some lines?
OK, just open the VBA window for module modGeneral , scroll down to the UpdateChart routine and remove the single quotes from the beginning of the six lines after the comment 'Highlight public holidays in selected colors
Did it ... thnx

As a matter of interest what language are you using and in which country?
It is in dutch

Attached File(s)
Attached File  Knipsel_1.JPG ( 337.5K )Number of downloads: 33
Attached File  Knipsel_2.JPG ( 247.67K )Number of downloads: 22
 
Go to the top of the page
 
Peter Hibbs
post Nov 3 2018, 07:01 AM
Post#30


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


Hi mrcunknown,

OK, try this one.

The changes I have made are that I have changed the criteria for the Dept field in query qryWeekdata to :- Like [Forms]![frmHolidays]![frmHolidaySub]![cmbPName]

I also added the Me.Painting = False and Me.Painting = True to the CmbPName AfterUpdate event to speed up the display a bit.

I think this does do what you want but I have not tested the other facilities like adding new holiday events, new departments, etc so I don't know if you might have any problems with that so I will leave that up to you.

Good luck with the project,

Peter.
Attached File(s)
Attached File  ROOSTER_Planner_V2_Werkbestand__2_.zip ( 206.71K )Number of downloads: 102
 
Go to the top of the page
 
mrcunknown
post Nov 6 2018, 06:03 AM
Post#31



Posts: 32
Joined: 22-September 18



thnx! that does the trick :-). This is very helpfull
Go to the top of the page
 
mrcunknown
post Nov 11 2018, 03:54 AM
Post#32



Posts: 32
Joined: 22-September 18



@pctechdr

Hi Chris, i was bussy with the report from tblHolidayDates. Only i can not get get it like i need. I mean that when i choose a department i get a calendar like the picture. Do i have to make a new query or something?


Attached File(s)
Attached File  Knipsel123.JPG ( 149.65K )Number of downloads: 40
 
Go to the top of the page
 
mrcunknown
post Nov 22 2018, 04:27 PM
Post#33



Posts: 32
Joined: 22-September 18



Is there possibly somebody who can help me in this? pullhair.gif
Go to the top of the page
 
Peter Hibbs
post Nov 23 2018, 05:55 PM
Post#34


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


Hi mrcunknown,

Perhaps you can upload a copy of your database with a detailed description of what you are trying to do and what problems you are having. Just showing us a screen shot on its own does not really help much.

Peetr Hibbs.
Go to the top of the page
 
mrcunknown
post Nov 25 2018, 01:40 AM
Post#35



Posts: 32
Joined: 22-September 18



Hi, Ofcourse.

What i mean is; I have a record tblWeekData that displays all employees for the first 28 days. Problem is that it doesn't show the date in top. I would like that in form frmHolidays there is a button that wen i select a department i only get a report (print) for that department.
Attached File(s)
Attached File  Planner_V2_Werkbestand__3_.zip ( 215.81K )Number of downloads: 56
 
Go to the top of the page
 
Peter Hibbs
post Nov 25 2018, 07:44 AM
Post#36


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


Hi,

OK, try this one.

I have added a button to the Calendar form called Print Report which opens the report in Preview mode (but you can change that to Print mode if you want to send the report to the printer immediately).

I am not entirely sure how you wanted the dates to be displayed at the top of the report so you will just have to check it out and make any changes that you need. Hopefully this will be something like your requirements. The dates and week numbers on the report are inserted using some VBA code in the report itself so you can make any changes to the code there, if necessary.

Good luck and let us know how you get on.

Peter.
Attached File(s)
Attached File  ROOSTER_Planner_V2_Werkbestand__PH_.zip ( 199.28K )Number of downloads: 81
 
Go to the top of the page
 
payfast8898
post Dec 22 2018, 12:19 PM
Post#37



Posts: 331
Joined: 23-April 15
From: NY


Hey Peter this is great but I have two questions maybe you can help with.

1. I inherited an very old access employee database and all the employees from 1 to 116 are gone and deleted.
so the issue is your planner don't work starting at 116 in the employee id. at this point I can't change their id's because they are imbedded in hundreds of thousands of records. I can just import them into your table and re auto number them but I was wondering if there was an easy way so I don' have to do all that?

2. when I click on a employee date it requery's back to the top of the list, is there anything we can do about that?

Thanks for your time
Bob

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
Peter Hibbs
post Dec 23 2018, 09:58 AM
Post#38


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


Hi Bob,

I am not entirely sure what you are trying to do but if you want to populate the Holiday Planner Employee table with your own employee names and you want to keep the EmployeeID numbers the same then there are two methods you could use. It is possible to import numbers into an AutoNumber field using VBA code and then set the next number in the sequence to the last number plus 1 and I can give you more details on that if you want to go that route.

The second option is to convert the AutoNumber field in the table to a normal Long Integer type, keeping the Index property as Yes (No Duplicates) and then you would have to add some code to your form so that the next highest number was used as the EmployeeID number each time you add a new employee record. I would suggest that this is a better option because it give you more control of the EmployeeID field values if you should ever need to make any more changes in the future.

Regarding the second question, it seems I was a bit too liberal with the Me.Requery command in the code and I think you can actually dispense with most of them. Assuming you are using Version 2 of the demo, I suggest is that you modify the code (after you make a back-up copy of the database first, of course) like this -

In the form frmHolidaySub wherever you have the bit of code like :-
CODE
    UpdateChart Parent!txtDate                                      're-display chart
    Me.Requery                                                      'and requery subform

you can replace that with :-
CODE
    Me.Painting = False
    UpdateChart Parent!txtDate                          're-display chart
    Me.Painting = True

so you can do that on th button events Private Sub cmdAddOneYear_Click() to Private Sub cmdSubOneYear_Click(). This will prevent the form scrolling back up to the top of the form when you use the buttons to move through the weeks.

You can do the same in the Private Sub Form_KeyDown and Private Sub cmdDates_MouseDown events.

For the Private Sub cmdDates_MouseUp event you need to do something similar like this :-
CODE
        Me.Painting = False
        Me.Recalc                                                                                        'and requery subform
        UpdateChart Parent!txtDate                                                                          're-display chart
        Me.Painting = True

Here we need the Me.Recalc command to refresh the data but this does not reset the form like the Requery command does.

You could probably use the same techniques for the Requery commands in the main form but I have not had time to check those out so I will leave that to you.

Hope this helps but let me know how you get on and if you need any further assistance.

Peter Hibbs.
Go to the top of the page
 
payfast8898
post Dec 23 2018, 12:36 PM
Post#39



Posts: 331
Joined: 23-April 15
From: NY


Hi Peter thanks for getting back to me

I used refresh to replace the requery's and worked great not sure if it was supposed to. I will switch it to your code.

As for the first part:
Playing around I did convert numbers to normal long integer just to see if that was the issue but no. my numbers are still 116-252 and it will not let me save a record.
I thought it was something to do with the starting position or gap between auto number field Employee ID in my system. As I Said I played around and deleted the Employee ID in my system and put it back in to re number my employees 1-78 and works great! when I import them it goes from 116-252. my would not save the record. However when I ran the same data in your system/download it worked fine. it was really weird if I keep the numbers starting at 1 it would work in my system but starting at 116 it would not and both work in your download so it is something to do with my old system so what I will do for now is use it as an external stand alone application if they want to use it.

No worries about that we are working on upgrading all our older software's to the new offices.

If you take suggestions or request this would be perfect if it automatically added the work day hours to a hours field based on the employees work day hours field when doing the date or date range so if it was one day would automatically put 8 hours for example. then on edit if it was half day we could change it to 4 or 2 etc. if they did a range would be like 5x8 for 40 hours a week. I know to add a display in the graph chart would be crazy to tell how many hr it was at a glance if not a full day but what about use one end of the image < instead of the <> so people could see it is not a full work day.

Any how you do great work thank you for sharing and happy holidays!


--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
Peter Hibbs
post Dec 23 2018, 05:09 PM
Post#40


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


Hi Bob,

I used refresh to replace the requery's and worked great not sure if it was supposed to. I will switch it to your code.
I thought that Refresh would not work in this situation but if it works for you, then fine.

Playing around I did convert numbers to normal long integer just to see if that was the issue but no. my numbers are still 116-252 and it will not let me save a record. I am not quite sure what you are doing exactly but I sounds like you are not resetting the AutoNumber field to 0 after deleting the records. Try deleting all the Employee records in the new database and then Compacting & Repairing the database which will reset the AutoNumber field (EmployeeID). Then import the new records again.

What about use one end of the image < instead of the <> so people could see it is not a full work day. OK, the attached Version 3 has the option to save and display the holiday period that use a half-day at the start or end of the period. I guess it would not be too difficult to calculate the hours used for each holiday period but I do not have the time to look at that at the moment, maybe after Christmas, if I get some time.

Anyway, have a play with this version and let me know what you think.

Peter.
Attached File(s)
Attached File  Holiday_Planner_V3.zip ( 224.85K )Number of downloads: 80
 
Go to the top of the page
 
6 Pages V < 1 2 3 4 > » 


Custom Search


RSSSearch   Top   Lo-Fi    6th December 2019 - 07:39 AM