Calendar on form

statsman

Active member
Local time
Today, 13:57
Joined
Aug 22, 2004
Messages
2,088
I currently have a form where a user can enter the criteria to print a report. For a date based report I would like to have 2 "pop-up" calendars where the user can click the start date and end date criteria.
Can anyone recommend a program or add-in that I can use with Access97?
 
I get the feeling you haven't used the search function on the forum yet. Maybe something here will meet your needs.
 
OUCH!! You got me. Thanks for the direct.
 
Searching is such a novel idea. :rolleyes:

I advise you to not use an ActiveX calander control. Too many problems with the users PC having missing references to the control.

Check out these custom Access calanders for you can import them right into your database...

Popup Calendar - Version 3

I prefer the authors first calendar because I do not want the fancy three months options. Here is the link to that one... Popup Calendar

You have to be a member [membership is free] of the UtterAccess forum to download the samples from their code archives section of the forum.
 
Last edited:
Just go to Sample Databases in this forum and look for a post called "A Neat Little Calendar". It is really a simple and tidy calendar. If you don't like that I remember Old Soft Boss had a post somewhere which had an extremely simple but 100% reliable calendar which could be started by double clicking on the datefield. You could search for his name to find that one. That example was about as easy to add as you could get, from memory only one line of code, but I prefer the first example because of it's looks and function. Mile-o-Phile or whatever he calls himself these days posted another great calendar which is easy to get going. There are plenty on this forum if you search about but the three I mentioned are probably as good as it gets without doing a lot of work. I love calendars for entering dates so I put 'em in all my db's.
 
I tried the simple Pop up calendar that ghudson suggested. I created the same module as in the sample form that comes with calendar and did the settings for the On Click aand OnDoubleClick as suggested.

However, a calendar does not pop up when I click on the button or doubleclick on the date field. Any help much appreciated. thanks.
 
Did you set OnClick to: =opencalendar("","text0")
 
Yes, I set the OnClick of the command button to

=opencalendar("","text11")

since my text box is not text0 but text11.

Nothing happens with this. (i do not know whether this is relevant, but just to let you know that I also have another MS Calendar control on this form am trying out with another field. I am just trying out different calendar controls to see which one works for me. I think these two calendars on the form probably have nothing to do with each other, but I just wanted to mention it in case it meant something to you. thanks again
 
No errors? Did you include the Form "frmCalendar" in your forms?
 
did not do that.

Just did that and it works great! thanks.

btw, does this work in a subform if the subform is within a subform. (the posting mentions it works only 1 layer deep. just wanted to confirm). thanks
 
You would have to modify the code if you want it to work more than one level deep.
 
"modify the code " :-(

Now just how deep is the modification required, you think?

this will be bummer if I cannot use it since I like the control, but then I have nested subforms several layers deep.

thanks
 
How many levels deep do your forms go? The problem is that you need to pass each subform level name to the function so that it can properly address the TextBox. I think you could get around this limitation by putting an invisible TextBox on the first level for the Calendar function and getting the value yourself regardless of how deep you are in SubForms.
 
thanks for the response RuralGuy.

I have 4 layer deep subforms. Can you please elaborate a bit more on how I may tweak the code. I see that the code requires a subform name parameter to be passed for the calendar to show in a subform. Can you just highlight the main steps. I am a novice at this, so ....

thanks again
 
Well I fibbed a bit in an earlier post. This particular Calendar works off of the Screen.ActiveForm. My work around was to use an invisible textbox on the main form and get the results through the Forms collection:

Me.Textdate = Forms!MainForm!HiddenTextBox

This code wants to set the focus to the receiving textbox but you can't set the focus to an invisible textbox. I'll have to think about it a bit. I'm trying to avoid modifying the code to handle up to 4 levels deep.
 
Here's a calendar I've been using in my personal stuff for a couple of years. I borrowed some of the sample forms to demo the Calendar. You would need to copy the form frmTimeMachine and module mdlDatePicker to your db for it to work. It does not rely on Screen.ActiveForm but rather utilizes a HiddenDate textbox on the main form. The SubForm gets the data through the Forms collection so it does not care how deep the level of SubForm. Leave all of the notices in place and I believe you comply with the licensing agreement.
 

Attachments

Ruralguy,

thanks a lot for your looking into this and taking the initiative to offer an alternative solution. I will try this out and let you know how it worked.
 

Users who are viewing this thread

Back
Top Bottom