473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Flexible use of Leban's calendar control

DFS
Probably someone else has done this, but I figured out a [fairly] flexible
way to use the Leban's calendar, such that you don't have to write code in
the DblClick event each time you want to use the control. This method works
with one date field at a time, ie a start date with no end date. If you
want to use the control to fill in a start/end range, you need to write code
in the DblClick event of the start date and specify the field names.

Anyway...

In a module (called mine modCalendar)

Declarations
Public mc As clsMonthCal

Public Function showCalendar(frmName As String)

'instance of the calendar class
Set mc = New clsMonthCal

'Set hWndForm Property
mc.hWndForm = Forms(frmName).hWnd

'add date to screen (dtStart is a global in my system)
dtStart = Date
If Not IsNull(Screen.ActiveControl) Then dtStart = Screen.ActiveControl
If ShowMonthCalendar(clsMC:=mc, StartSelectedDate:=dtStart) = True Then
Screen.ActiveControl = dtStart
End If
End Function
Now from the calling form or subform, add =showCalendar("PARENT_FORM_NAME")
to the DblClick event in the Properties dialog. Works well if you have a
bunch of forms with grids of dates.


Dec 10 '06 #1
0 1042

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Ty Smith via AccessMonster.com | last post by:
I noticed that the week numbers in Stephan Leban's MonthCalendar are not consistent with Microsoft Outlook (they are shifted one week forward). Is there any way I can sync these two up by changing...
5
by: Miguel Dias Moura | last post by:
Hello, i am trying to create a .css file with several styles and apply them to the calendar control so i can change the look of: 1. Text Type and Format (Bold, Underline, etc) 2. Background...
2
by: Caesar Augustus | last post by:
First, let me start by saying my asp.net experience is still in it's infancy so please bare with me as I try to explain my situation. I have created a single page that with the use of many...
1
by: Chesne | last post by:
Does anyone know if it is possible to link Leban's Calendar to a table so that when it is activated it will show previous dates which have been booked? TIA - Ray
3
by: vtashore | last post by:
I downloaded Steve Leban's RTF2 control and it works as advertised. Good news! After reading reference material on the RTF standard codes, I have been able to write update queries to universally...
2
by: Pascal Hagedorn | last post by:
I downloaded Steve Leban's RTF2 control and it shows me the report as wanted. The Problem is, if i want to print it, it comes a PopUp where it says "properties write protected" (german:...
3
by: thorpk | last post by:
I posted this problem earlier in the month and some one decided it was better to change the subject and ask a completely different question. I am therefore reposting. I am hoping some one can...
0
by: bushman69 | last post by:
Hi I have been using Stephen Lebans Calander in access 2000. It is excellent, but I want to locate the calendar at the bottom left hand corner of a textbox. I have played around with it, but my...
0
by: Cirene | last post by:
I'm creating an asp.net web calendar application that will be function much like the Outlook calendar. Features include... Ability to see a month, week, day or custom view (including viewing...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.