|
-
Sep 10th, 2009, 08:46 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Monthview DayBold & Overflow Error
I have a monthview control on my form and I want certain days to show up bold using the following code:
Code:
Public Function HighlightCalendar(ByVal strCRNumber As String, strReviewDate As Date)
Dim rsDateList As ADODB.RecordSet
Set rsDateList = New ADODB.RecordSet
Dim strDate As String
Dim strSql As String
strDate = Format(strReviewDate, "MM/DD/YYYY")
strSql = "SELECT Location.Location_Date " & _
"FROM Master_Review INNER JOIN Location ON Master_Review.ID = Location.ID " & _
"Where Master_Review.CR_Number = '" & strCRNumber & "' And Master_Review.Review_Date = " & "#" & strDate & "#" & _
"ORDER BY Location.Location_Date"
With rsDateList
.Open strSql, conAccess, adOpenStatic, adLockOptimistic
Do While Not .EOF
frmMain.monReviewDates.DayBold(.Fields!Location_Date) = True
Loop
End With
End Function
On the line I've highlighted above though, I get an "Overflow 6" error. What is causing this?
-
Sep 10th, 2009, 08:50 AM
#2
Re: Monthview DayBold & Overflow Error
What is the value of .Fields!Location_Date at the time of error?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Sep 10th, 2009, 08:54 AM
#3
Thread Starter
Fanatic Member
Re: Monthview DayBold & Overflow Error
08/04/2009. Oddly enough, if I hard code a date of 09/09/2009 it works.
If I hard-code 08/04/2009 it craps out again. Hmm.
Last edited by The_Grudge; Sep 10th, 2009 at 09:15 AM.
-
Sep 10th, 2009, 10:16 AM
#4
Re: Monthview DayBold & Overflow Error
What data type is Location_Date field?
Also what is the max and min date of the monthview control set to?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Sep 10th, 2009, 10:18 AM
#5
Thread Starter
Fanatic Member
Re: Monthview DayBold & Overflow Error
It's a date/time field in Access formatted as mm/dd/yyyy
-
Sep 10th, 2009, 10:25 AM
#6
Re: Monthview DayBold & Overflow Error
and what is the max and min date of the monthview control set to?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Sep 10th, 2009, 10:35 AM
#7
Re: Monthview DayBold & Overflow Error
Ok Try this... this will work. Just add this one line
vb Code:
frmMain.monReviewDates.Value = .Fields!Location_Date frmMain.monReviewDates.DayBold(.Fields!Location_Date) = True
Apparently Monthview gives an error if the date you want to make bold is not displayed.
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|