DeveloperBarn Forums

DeveloperBarn

Programming & IT forum

Custom Calendar Control

This is a discussion on Custom Calendar Control within the Access Database Samples forums, part of the Microsoft Access category; I picked this up sometime ago. Personally, I don't like the active x calendar control, and I?ll try to avoid ...

Go Back   DeveloperBarn Forums > Databases > Microsoft Access > Access Database Samples

  #1  
Old March 16th, 2008, 11:32 AM
AOG123's Avatar
Lightning Master
 
Join Date: Mar 2008
Location: Fortress Of Solitude
Posts: 218
Rep Power: 5
AOG123 is a jewel in the roughAOG123 is a jewel in the roughAOG123 is a jewel in the roughAOG123 is a jewel in the rough
Default Custom Calendar Control

I picked this up sometime ago. Personally, I don't like the active x calendar control, and I?ll try to avoid most active x's where possible.

This is very straightforward to implement, and it will certainly improve data accuracy.

If you want to use it, just copy the module and calendar form into you db. You can add it to all your forms with ease. Just call the calendar from a text box, i've used the dblclick event. But on GotFocus is benificial.

Comments on this post
jmurrayhead agrees: Nice work
sbenj69 agrees:
icoombs agrees: Very nice
tomek agrees: Thanked Post
Carenas agrees: Thanked Post
tuxalot agrees: Thanked Post
Velid agrees: Thanked Post
Attached Files
File Type: zip Calendar.zip (23.3 KB, 252 views)
Reply With Quote
The Following 4 Users Say Thank You to AOG123 For This Useful Post:
Carenas (January 17th, 2009), tomek (December 18th, 2008), tuxalot (March 3rd, 2009), Velid (February 1st, 2010)
  #2  
Old March 16th, 2008, 02:06 PM
sbenj69's Avatar
Moderator
 
Join Date: Mar 2008
Location: The frigid northern plains
Posts: 260
Rep Power: 4
sbenj69 is a jewel in the roughsbenj69 is a jewel in the roughsbenj69 is a jewel in the rough
Default

nice.
Reply With Quote
  #3  
Old September 6th, 2008, 07:04 AM
Barn Newbie
 
Join Date: Sep 2008
Posts: 1
Rep Power: 2
zip929 is an unknown quantity at this point
Default

Neat, and very useful. Well done.
Reply With Quote
  #4  
Old September 6th, 2008, 07:36 AM
AOG123's Avatar
Lightning Master
 
Join Date: Mar 2008
Location: Fortress Of Solitude
Posts: 218
Rep Power: 5
AOG123 is a jewel in the roughAOG123 is a jewel in the roughAOG123 is a jewel in the roughAOG123 is a jewel in the rough
Default

Glad it helped,. unfortunately its not my design,. but props to who ever made it,.

Comments on this post
corint agrees: Thanked Post
__________________
If i helped you, make me famous by clicking the

Status: Currently Unemployed - Looking for Work, Can be contacted on thethresher@hotmail.co.uk
Reply With Quote
The Following User Says Thank You to AOG123 For This Useful Post:
corint (September 14th, 2009)
  #5  
Old December 9th, 2008, 05:08 PM
Barn Newbie
 
Join Date: Dec 2008
Posts: 2
Rep Power: 2
Psychadelic is an unknown quantity at this point
Question How to implement this into a ComboBox?

Hi there,

i like this Calendar form, but how can i make this work in a ComboBox?
it worked fine in a Textbox control, but i'd like to implement it into a ComboBox.

Please help,

Also a next step would be to make this work with:

- a ComboBox on Mainform that is connected to a Subform
(my form works fine: when i choose a date in Dropdownlist of my ComboBox the records in the subform that corresponds to the date in mainform will be shown)
Reply With Quote
  #6  
Old December 9th, 2008, 06:48 PM
AOG123's Avatar
Lightning Master
 
Join Date: Mar 2008
Location: Fortress Of Solitude
Posts: 218
Rep Power: 5
AOG123 is a jewel in the roughAOG123 is a jewel in the roughAOG123 is a jewel in the roughAOG123 is a jewel in the rough
Default

Hi, I had a think about this and there is no need for a combo,.

What you want to do is: -

1: Ensure your subform is based on a query

2: In this query use this type of filter,
Code:
Like "*" & [Forms]![MainFormName]![DateTextBox] & "*"
' "*" will show all records when blank'

3: In the main form create a command button to Filter the sub,
Code:
Me.Refresh
And thats pretty much it

Please see new attachment for reference.

Comments on this post
Psychadelic agrees: Thanked Post
Attached Files
File Type: zip Calendar_filter.zip (39.5 KB, 40 views)
__________________
If i helped you, make me famous by clicking the

Status: Currently Unemployed - Looking for Work, Can be contacted on thethresher@hotmail.co.uk
Reply With Quote
The Following User Says Thank You to AOG123 For This Useful Post:
Psychadelic (December 10th, 2008)
  #7  
Old December 10th, 2008, 05:34 PM
Barn Newbie
 
Join Date: Dec 2008
Posts: 2
Rep Power: 2
Psychadelic is an unknown quantity at this point
Smile

Thanks for the reply,

i have added your code "Me.Refresh" in my mainform behind a commandbutton On click event, and it works to "filter" subform with selected date.

but the whole form/subform doesnt really work as intended, its not finished yet. i run into severl minor probs.


Form: mainfrmExperiment1
-------------------------

I have a Mainform with a combobox named "cboDate" that has a Select query in it "to select only the entered Dates available at that moment in the Database table "Work_Table" using DISTINCT (so no duplicate dates).

When u Double-click on the combobox cboDate a Calendar will popup, letting the user to choose a date in calendar and put it in the cboDate combobox.
this works but i m getting other issues that i have to find a solution for it:

Request 1:

After selecting Date in Calendar, if you pust "Show" button, access should

check if its a new date or an already existing date. If it is a new date with no records in Work_Table, user should be prompt with msgbox "no records found, would you like to enter records for this date?" something like that.

Then

- user can add a new record for chosen date (the date you entered in cboDate combobox will be your primary key)
- only Date should be displayed, and all other fields in the record are empty,

the user has to select employeename, shift, and then add the periods.

(im aware of the fact that i need to make a second table "Work_Details", so i can make a 1-N relation between (Date, Employeenr, Shift) <-----> (Periods, start_time, end_time, activity_code, area_nr)


Request 2:

There should be a counter in column "Period", when you Add new record
(maybe this can be solved by coding but i dont know howto)

i have more questions regarding the same form, on how to do it in access and havent found an answer yet. so maybe i will post these later on.

For now, please check attached Database, and im looking forward to your ideas/suggestions on how to improve this form.
Attached Files
File Type: zip Labordatabase.zip (139.1 KB, 44 views)
Reply With Quote
Reply

  DeveloperBarn Forums > Databases > Microsoft Access > Access Database Samples

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:21 PM.


Copyright ©2008-2010, DeveloperBarn

Content Relevant URLs by vBSEO 3.3.2