473,765 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Lebans' calendar

I have a quick, probably easy, question about Lebans' calendar
program.

I have a form that allows a user to click on different technicians.
When this happens, Lebans' calendar comes up with various dates set to
bold based on the technician selected. However, when I close the
calendar and select a different technician, the bold dates carry over
from the previous technician selected.

I can't find a way to clear the bold days after the user closes (or
before he opens) the calendar without creating different calander
objects for each technician. I'm sure there is a way, but I just can't
seem to find it.

Any help would be greatly appreciated.

MW
Nov 12 '05 #1
7 2656
The latest versions clear the DayState array by default. I've also added
some new features and cleaned up the code some more.
http://www.lebans.com/monthcalendar.htm
Version 9.8 April 05, 2004

Couple of UI Bug fixes. Both the Font and Color Dialog Windows were
appearing BEHIND the MonthCalendar window. If the user did not select a
Color, the returned Error value(-1) was being applied.

Version 9.6 April 01, 2004

Sorry, another (and the final) Major modification to the calling
function logic including calling Parameter order. Removed several
function params and made them persistent properties instead. Simplified
function call to only require 3 params. Added Menu Check marks for
current settings in Properties Menu. Added Menu to allow user to close
the Calendar Window.

Version 9.4 March 28, 2004

Major modification to the calling function logic including calling
Parameter order. Changed function to return Boolean FALSE and
"StartSelectedD ate =0" if user did not select a date from the
MonthCalendar. The hWndForm param is no longer optional.

Version 9.2 January 26, 2003

Fixed issue with focus not returning to forms in Popup mode.

Version 9.1

Fixed DayState property so that it is actually useable now without
having to jump through hoops! Fixed Window positioning prop so Calendar
will now popup at the cursor location when the user clicks to open the
Calendar. Fixed(hopefully ) issue of Access properly getting the focus
after the Calendar closes. Cleaned code up a bit more!!

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Mason" <ma***@codemonk ey.cc> wrote in message
news:eb******** *************** ***@posting.goo gle.com...
I have a quick, probably easy, question about Lebans' calendar
program.

I have a form that allows a user to click on different technicians.
When this happens, Lebans' calendar comes up with various dates set to
bold based on the technician selected. However, when I close the
calendar and select a different technician, the bold dates carry over
from the previous technician selected.

I can't find a way to clear the bold days after the user closes (or
before he opens) the calendar without creating different calander
objects for each technician. I'm sure there is a way, but I just can't
seem to find it.

Any help would be greatly appreciated.

MW


Nov 12 '05 #2
Stephen:

Thanks a lot for your response. I updated my calendar with your newest
version, but I'm still seeing the same issue. Here is the procedure I
have, which is almost identical to your examples. I have another
procedure exactly like this except for a more limiting SQL string. Each
time I call the calendar, it doesn't seem to clear the previously bolded
entries. I assume I'm missing something.

Private Sub cmdAllVisits_Cl ick()
Dim strSQL As String
Dim rst As DAO.Recordset
Dim dbs As Database

Set dbs = CurrentDb

strSQL = "SELECT * FROM tblVisits " & _
"WHERE CallStatus='Ope n'"

Set rst = dbs.OpenRecords et(strSQL)
' Retrieve the currently selected date(s).
' Call our Function to display the Calendar
' Init the Calendar to select the date
' contained in this control.
' Position Calendar at cursor location when Calendar is created.
mc.PositionAtCu rsor = False

Do While Not rst.EOF
mc.SetBoldDaySt ate DatePart("yyyy" , rst!DateAssigne d), DatePart("m",
rst!DateAssigne d), DatePart("d", rst!DateAssigne d)
rst.MoveNext
Loop

' Retrieve the currently selected date(s).
' Call our Function to display the Calendar.
' Defaults to showing Todays Date
' *** Only takes One Click to Select a Date and Close the Window ***
Dim blRet As Boolean
Dim dtStart As Date, dtEnd As Date

dtStart = Nz(Me.tboDateAs signed.value, 0)
dtEnd = 0

blRet = ShowMonthCalend ar(mc, dtStart, dtEnd)

If blRet = True Then
Me.tboDateAssig ned = dtStart
Me.tboRepDate = dtStart
End If
End Sub

Thanks again,

MW

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
Sorry Mason, I missed the part of your post where you stated you were
actaully SETTING the DayState prop!
In looking at the prop, the only way to clear the dates is to loop back
through the recordset you used to set the BoldDayState property using
the Optional ResetMonth boolean param to TRUE.

Really though, there should be a simple Method you can call to clear out
the DayState array.
Open the MonthCalendar class and add this code:

Public Sub ResetBoldDaySta te(reset As Boolean)
If reset Then
Erase BoldDayStates
End If
End Sub

Save the Code module and Compile the project.
Now to clear the DayState prop enter this line of code BEFORE you open
the Calendar.
mc.ResetBoldDay State True

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Mason Wood" <ma***@codemonk ey.cc> wrote in message
news:40******** *************@n ews.frii.net...
Stephen:

Thanks a lot for your response. I updated my calendar with your newest version, but I'm still seeing the same issue. Here is the procedure I
have, which is almost identical to your examples. I have another
procedure exactly like this except for a more limiting SQL string. Each time I call the calendar, it doesn't seem to clear the previously bolded entries. I assume I'm missing something.

Private Sub cmdAllVisits_Cl ick()
Dim strSQL As String
Dim rst As DAO.Recordset
Dim dbs As Database

Set dbs = CurrentDb

strSQL = "SELECT * FROM tblVisits " & _
"WHERE CallStatus='Ope n'"

Set rst = dbs.OpenRecords et(strSQL)
' Retrieve the currently selected date(s).
' Call our Function to display the Calendar
' Init the Calendar to select the date
' contained in this control.
' Position Calendar at cursor location when Calendar is created.
mc.PositionAtCu rsor = False

Do While Not rst.EOF
mc.SetBoldDaySt ate DatePart("yyyy" , rst!DateAssigne d), DatePart("m", rst!DateAssigne d), DatePart("d", rst!DateAssigne d)
rst.MoveNext
Loop

' Retrieve the currently selected date(s).
' Call our Function to display the Calendar.
' Defaults to showing Todays Date
' *** Only takes One Click to Select a Date and Close the Window ***
Dim blRet As Boolean
Dim dtStart As Date, dtEnd As Date

dtStart = Nz(Me.tboDateAs signed.value, 0)
dtEnd = 0

blRet = ShowMonthCalend ar(mc, dtStart, dtEnd)

If blRet = True Then
Me.tboDateAssig ned = dtStart
Me.tboRepDate = dtStart
End If
End Sub

Thanks again,

MW

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 12 '05 #4
Stephen:

I added that bit of code and it works beautifully. I can't thank you
enough for your help.

MW

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #5
Everyone here knows Lebans' code never worked and never will. Why don't you
let Lebans answer for his junk personally instead of bothering the group with
it?
In article <40************ *********@news. frii.net>, ma***@codemonke y.cc says...

Stephen:

I added that bit of code and it works beautifully. I can't thank you
enough for your help.

MW

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 12 '05 #6
ca******@hotmai l.com (Carr Clifton) wrote:
Everyone here knows Lebans' code never worked and never will. Why don't you
let Lebans answer for his junk personally instead of bothering the group with
it?


Hmmm, this sure looks like a drive by posting by our favourite troll.

Oh, and rubbish. Stephen Leban's contributions are highly valued.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 12 '05 #7
craigdolphin
1 New Member
Sorry to resurrect this thread.

I've been using the Leban MonthCalendar and have it working in a similar way to display dates where legal fisheries are occuring (this is a fisheries regulations database).

I was wondering if anyone knows how to alter the properties of the dates when the daystatebold property is true. I find that the font weight difference isn't that pronounced and I'd like to tweak it so that it draws highlighted days with a heavier font weighting, or perhaps a different color, so that they stand out more.

Would appreciate any ideas.
Thanks,
Craig
Feb 9 '06 #8

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

Similar topics

8
2018
by: Larry R Harrison Jr | last post by:
Sometime, if an error has occured or even if a user has answered NO to a MsgBox Y/N question, the Lebans calendar control will prevent the form from closing. I know the Lebans calendar control is excellent--I have not once used the Active X Calendar Control since discovering it--but this is an error that I need to fix. I am supposing it's something in the form's UNLOAD procedure which would have to be tweaked. Tips?
5
3429
by: Larry R Harrison Jr | last post by:
I use the Lebans calendar control and love it; the only thing is that it commonly starts out at the year 1899 rather than the current year. Is there a way to specifically tell it to start at the current date instead? Note: it does this fine if I'm using it in the context of a form's text box, but I'm trying to use it on a module which is called, whereby the date chosen is the date plugged into a variable. Everytime after I reset the...
6
516
by: Mason | last post by:
I have a quick, probably easy, question about Lebans' calendar program. I have a form that allows a user to click on different technicians. When this happens, Lebans' calendar comes up with various dates set to bold based on the technician selected. However, when I close the calendar and select a different technician, the bold dates carry over from the previous technician selected. I can't find a way to clear the bold days after the...
5
1400
by: Michael Gramelspacher | last post by:
I am using Lebans's calendar with Access 97 running on Windows 95, and Access 2000 on a different machine also running Windows 95. I had been using an earlier version of the calendar without problem. Now I switched to version 2.01. The only problem is that is will not honor the setting to open where last dragged. Same with both databases. Since the sample files behave properly, the code compiles and there are no reference problems, I...
4
1922
by: Andrew Chanter | last post by:
I recently installed Stephan Lebans calendar control into an application. Only problem is that it always launches at the extreme right of the screen with most of the dialog off screen. I am activating it with a command button next to the field I want to update. Dont know if this is the issue. Any clues??
16
3060
by: DFS | last post by:
If you're listening, I want the middle of the calendar (showing 1 month) to open below the cursor position. It currently opens just to the right and below the cursor position. I hunted through the code, but can't determine what to alter. Very nice piece of work, by the way. Thanks
3
1488
by: CuriousOne1 | last post by:
Hi all, I don't know if anyone has come accross this before. I've been using Steve Lebans Calendar control (available here: www.lebans.com/monthcalendar.htm ) for several database application I've built. I only noticed recently, that after I've selected a date range, by highlighting the desired date, e.g. from 1 August 2007 to 7 August 2007, if I then use the navigation buttons to scroll from month to month, the same number of days is...
5
1509
by: Vaudousi | last post by:
Hi Dear Friends Is it possible to integrate Lebans calendar on a form in lieu and place of the Microsoft MonthView ? Many TKS in advance. José
0
10161
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9955
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8831
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7378
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.