Lebans MonthCalendar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having a problem with days that are bold. I have commented out all of the lines in the class initialize event that call SetBoldDayState. The odd thing is that the days that are bold were never set with SetBoldDayState. Does anyone know how to makes these days not bold.
 
I just went into the clsMonthCal module and commented out the following
code in the class's Initialize event. It worked as expected with no
dates being displayed in bold.

' Set DayState
' For this example we will set one day per month
' corresponding to the Month number
Erase BoldDayStates
' Here is an example of how to Set the BoldDayState prop.
'­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
' SetBoldDayState 2003, 1, 1 ' ', Twenty:=True
' SetBoldDayState 2003, 2, 2 'numMonth:=2, Two:=True ', TwentyOne:=True
' SetBoldDayState 2003, 3, 3 'numMonth:=3, Three:=True ',
TwentyTwo:=True
' SetBoldDayState 2003, 4, 4 'numMonth:=4, Four:=True ',
TwentyThree:=True
' SetBoldDayState 2003, 5, 5 'numMonth:=5, Five:=True ',
TwentyFour:=True
' SetBoldDayState 2003, 6, 6 'numMonth:=6, Six:=True ', TwentyFive:=True
' SetBoldDayState 2003, 7, 7 'numMonth:=7, Seven:=True ',
TwentySix:=True
' SetBoldDayState 2003, 8, 8 'numMonth:=8, Eight:=True ',
TwentySeven:=True
' SetBoldDayState 2003, 9, 9 'numMonth:=9, Nine:=True ',
TwentyEight:=True
' SetBoldDayState 2003, 10, 10 'numMonth:=10, Ten:=True ',
TwentyNine:=True
' SetBoldDayState 2003, 11, 11 'numMonth:=11, Eleven:=True ',
Thirty:=True
' SetBoldDayState 2003, 12, 12 'numMonth:=12, Twelve:=True ',
ThirtyOne:=True
'­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

Let me know if you are still having trouble.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Ken said:
I am having a problem with days that are bold. I have commented out
all of the lines in the class initialize event that call
SetBoldDayState. The odd thing is that the days that are bold were
never set with SetBoldDayState. Does anyone know how to makes these
days not bold.
 
Yes, I commented out those lines. I get days other than those that were set up in those lines of code showing up bold. I could send you a screenshot if that would help.

Ken Jensen
 
I have never heard of this error before.
Did you leave the code to clear/erase the BoldDayState array in the
Initialize event?
Erase BoldDayStates

Do you have code you have created trying to set the BoldDayState
property?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Ken said:
Yes, I commented out those lines. I get days other than those that
were set up in those lines of code showing up bold. I could send you a
screenshot if that would help.
 
Yes, I left that line intact. Also tried to trace back through the code for setting this and could find nothing out of place.
 
If you want send me your MDB and I will have a look at it for you.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Ken said:
Yes, I left that line intact. Also tried to trace back through the
code for setting this and could find nothing out of place.
 
Ken I've got to say that I am not very happy. I realize you probably did
not mean any harm but I get tired of this repeating pattern.

1) Developer posts in the public MS Access NG's that my code does not
work.

2) I take the time to look at my source and I cannot duplicate the issue
so I ask the developer to send me their MDB that exhibits the bug.

3) When I receive the MDB my code has been radically changed from the
original source. I am expected to spend my time debugging someone else's
code.

From my point of view this is ludicrous at best. Your posting to this NG
would lead the readers to believe that my code fails.

IN your specific case you have made major mods to my original source. I
spent an hour backtracking the error through the altered code until I
resolved the issue.

You are declaring the NMDAYSTATE structure incorrectly. It does not
match my original source.
The structure member declaration
prgDayState(11) as MONTDAYSTATE
is supposed to be declared
prgDayState as Long


Good luck with your project. I do like the changes you have made to my
code but it is now your code.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"Stephen Lebans"
 
Thanks for your help. I am also sorry to cause you any problems. Your calendar is very nice and I am very glad you choose to share your work so willingly.

Ken
 
To compile any Access database ...

1. Open any code window (use Alt-F11)
2. From the Menu in the code window, select Debug|Compile
3. If there are problems or errors in the code, the "offending line" will
be highlighted.
4. Correct any errors, save and click Debug|Compile again.
5. When the compile process completes without returning any error messages,
the compile was successful.

hth,

--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


Pete Merenda said:
Ken,

Thanks for the suggestions but, I'm stumped on how to "compile" the Db.
As a novice, I have to rely on the help files to educate myself of
functions. Unfortunately, there's no clear direction on how to compile the
Db. Does Access have a built-in compiler tool? Might Access refer to
"compiling" by some other term -- referenceable in help files?
 
Ok
I guess I just learned something new.
Can you tell me the purpose for compile?
I understand debug.
I have always understood access was Not compilable as most compilers went.
ie; No .exe, or .com programs after compiling.
Please explain
TIA
Donny
 
When you compile an Access database it:

- converts all of your VBA into (IIRC) binary
- finds and highlights all syntax or other code errors

If you do not compile your database before delivering it to users,
uncompiled code will be compiled when it is called. This will slow down
your database's operation and will, if there are syntax or other errors,
inform your users of those errors.

Compiling does not necessarily produce an EXE file. In Visual Basic, one
can compile in the IDE as many times as desired, but that does not create an
EXE. Back in the days when I was a Clipper programmer, one compiled to
produce an OBJ file and then used a linker to create the EXE.
 
Back
Top