-
WSlmo23111
AskWoody LoungerBack again! Seem to be running into one little problem. If I try to change update/change only the manager field for an associate, I get a run-time error…unless I put in an InactiveDt. I can then update the records and go back remove the InactiveDt and update again. Any ideas why this is happening? The db is now in Access 97 format.
Thanks
-
WSlmo23111
AskWoody LoungerThanks again! It works beautifully, and with that I am calling it a night. I really appreciate all of the help that you give me.
nite
-
WSlmo23111
AskWoody LoungerHans,
Can that same If IsNull stmt be inserted in the code corrected code that you originally gave me?
Case “&Update”
sSQL = “UPDATE tblAssociateList ” & _
“SET username = ‘” & Me.txtOperator.Value & “‘, ” & _
“Manager='” & Me.cboManager.Value & “‘, ” & _
“AssocType='” & Me.cboAssocType.Value & “‘, ” & _
“ShiftHrs=” & Me.txtShiftHours.Value & “, ” & _
“ActiveDt=#” & Me.txtActiveDt.Value & “#, ” & _
“InActiveDt=#” & Me.txtInactiveDt.Value & “# ” & _
“WHERE username = ‘” & Me.lstOperators & “‘” -
WSlmo23111
AskWoody LoungerHad to fix those typos again. It is working correctly now. How much modification is needed to leave the InactiveDT field blank? the reason that I ask is because I have another simular form that has this same type of field (see code below) and this same field can remain blank and not cause any errors.
Select Case Me.cmdAction.Caption
Case “&Add”
sSQL = “INSERT INTO tblUserLog (UserID, UserName, NmFirst, NmLast, ActiveDt, AccessLevel, Password) VALUES (”
sSQL = sSQL & Me.txtUserID & “, ‘”
sSQL = sSQL & Me.txtUsername & “‘, ‘”
sSQL = sSQL & Me.txtFirstName & “‘, ‘”
sSQL = sSQL & Me.txtLastName & “‘, ‘”
sSQL = sSQL & Me.txtActiveDate & “‘, ”
sSQL = sSQL & Me.cboAccessLevel & “, ‘howitzer1’)”
Case “&Update”
sSQL = “UPDATE tblUserLog SET username = ‘” & Me.txtUsername & “‘, ”
sSQL = sSQL & “NmFirst = ‘” & Me.txtFirstName & “‘, ”
sSQL = sSQL & “NmLast = ‘” & Me.txtLastName & “‘, ”
sSQL = sSQL & “InActiveDt = ‘” & Me.txtInactiveDate & “‘, ”
sSQL = sSQL & “AccessLevel = ” & Me.cboAccessLevel
sSQL = sSQL & ” WHERE UserID = ” & Me.lstUsers
End Selectthanks!
-
WSlmo23111
AskWoody LoungerHans,
I am getting a Compile error, Method or data member not found. It seems to be hanging up on Me.txtShiftHours. Any ideas?
“VALUES (‘” & Me.txtOperator & “‘, ‘” & Me.cboManager & “‘, ‘” & Me.cboAssocType & _
“‘, ” & Me.txtShiftHours & “, #” & Me.txtActvieDt & “#, #” & Me.txtInactiveDt & “#)”Thanks for finding that typo
-
WSlmo23111
AskWoody LoungerFabulous!!!! Thanks for letting me pick those brains
-
WSlmo23111
AskWoody LoungerHopefully this will be my last post of the day
I am using the curent formulas to determine the the BOM(Beginning of the month) =WORKDAY(EOMONTH(RDate,-1)+1,-1)
, and EOM(End of Month) =WORKDAY(EOMONTH(RDate,0)+1,-2)This worked great until “RDate” became 04/29/05, which would be the first funding day of the next month. Is there a way to modify the formulas so that they will look at “RDate” and then calculate what the beginning and end of month would be?
Marie
-
WSlmo23111
AskWoody LoungerThat was the ticket!
Thanks again!!!
-
WSlmo23111
AskWoody LoungerJust the average (not including *FDIM) should come to 54, and I am getting 36? Do you think that this has something to do with the blank cells?
-
WSlmo23111
AskWoody LoungerMay 12, 2005 at 11:38 am in reply to: Additional IF statement for formula in use (Excel 2000) #947123Perfect! Thanks again!
-
WSlmo23111
AskWoody LoungerYou are good!!!
Thanks again!!
-
WSlmo23111
AskWoody LoungerSorry Hans!
It is K1
-
WSlmo23111
AskWoody LoungerHans,
Thanks so much for the help with this. Wondering if you could help with another calculation. I have in Cell I1, a calculation to provide me with a QTD total:
=IF(MONTH(Date)>=10,DATE(YEAR(Date),10,1),IF(MONTH(Date)>=7,DATE(YEAR(Date),7,1),IF(MONTH(Date)>=4,DATE(YEAR(Date),4,1),DATE(YEAR(Date),1,1))))
This worked well until I found out that funding days do not include the last working day of the current month, but do include the last working day of the previous month.
Is there a way that this QTD calculation can be modified to work in this manner?
Thanks again for any assistance that you can provide.
Marie
-
WSlmo23111
AskWoody LoungerOk, I have had some time to think about this. I had taken a some code from another post to help calculate workdays. When I looked at it for the one hundredth time, I finally saw were the code rounded down days to the previous workday instead of up to the next workday. I have made the modifecation and it works like it should. Modified code:
Public Function GetNextWorkday(ByVal StartDate As Date, _
ByVal lngInterval As Long) As DateDim lngWeeks As Long
Dim lngDays As LongIf lngInterval = 0 Then
GetNextWorkday = StartDate
ElseIf lngInterval > 0 Then
‘ Make sure StartDate is a workday (round up):
If Weekday(StartDate) = vbSunday Then
StartDate = StartDate + 1
ElseIf Weekday(StartDate) = vbSaturday Then
StartDate = StartDate + 2
End If‘ Calculate lngWeeks and lngDays:
lngWeeks = lngInterval 5 ‘ Integer division operator
lngDays = lngInterval – (lngWeeks * 5) ‘ remainder
StartDate = StartDate + (lngWeeks * 7)
‘ Account for weekends:
If (DatePart(“w”, StartDate) + lngDays) > 6 Then
StartDate = StartDate + lngDays + 2
Else
StartDate = StartDate + lngDays
End IfElse ‘ lngInterval < 0
lngInterval = lngInterval * -1 ' Make positive & subtract later
' Make sure StartDate is a workday (round up):
If Weekday(StartDate) = vbSunday Then
StartDate = StartDate + 1
ElseIf Weekday(StartDate) = vbSaturday Then
StartDate = StartDate + 2
End IflngWeeks = lngInterval 5
lngDays = lngInterval – (lngWeeks * 5)
StartDate = StartDate – (lngWeeks * 7)If (DatePart("w", StartDate) – lngDays) < 2 Then
StartDate = StartDate – lngDays – 2
Else
StartDate = StartDate – lngDays
End If
End IfGetNextWorkday = StartDate
End Function
-
WSlmo23111
AskWoody LoungerHans,
I have looked over the functions in the link that you provided, and do not see a specific one that would fit my need.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Windows 11 Insider Preview build 26200.5600 released to DEV
by
joep517
2 hours, 34 minutes ago -
Windows 11 Insider Preview build 26120.3964 (24H2) released to BETA
by
joep517
2 hours, 35 minutes ago -
Drivers suggested via Windows Update
by
Tex265
2 hours, 26 minutes ago -
Thunderbird release notes for 128 esr have disappeared
by
EricB
11 minutes ago -
CISA mutes own website, shifts routine cyber alerts to X, RSS, email
by
Nibbled To Death By Ducks
9 hours, 26 minutes ago -
Apple releases 18.5
by
Susan Bradley
3 hours, 51 minutes ago -
Fedora Linux 40 will go end of life for updates and support on 2025-05-13.
by
Alex5723
10 hours, 52 minutes ago -
How a new type of AI is helping police skirt facial recognition bans
by
Alex5723
11 hours, 30 minutes ago -
Windows 7 ISO /Windows 10 ISO
by
ECWS
22 minutes ago -
No HP software folders
by
fpefpe
19 hours, 11 minutes ago -
Which antivirus apps and VPNs are the most secure in 2025?
by
B. Livingston
3 hours, 8 minutes ago -
Stay connected anywhere
by
Peter Deegan
1 day ago -
Copilot, under the table
by
Will Fastie
15 hours, 47 minutes ago -
The Windows experience
by
Will Fastie
1 day, 6 hours ago -
A tale of two operating systems
by
Susan Bradley
21 hours, 44 minutes ago -
Microsoft : Resolving Blue Screen errors in Windows
by
Alex5723
1 day, 12 hours ago -
Where’s the cache today?
by
Up2you2
2 days, 3 hours ago -
Ascension says recent data breach affects over 430,000 patients
by
Nibbled To Death By Ducks
1 day, 20 hours ago -
Nintendo Switch 2 has a remote killing switch
by
Alex5723
20 hours, 33 minutes ago -
Blocking Search (on task bar) from going to web
by
HenryW
2 hours, 52 minutes ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
2 days, 20 hours ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
2 days, 20 hours ago -
regarding april update and may update
by
heybengbeng
2 days, 22 hours ago -
MS Passkey
by
pmruzicka
2 days ago -
Can’t make Opera my default browser
by
bmeacham
3 days, 5 hours ago -
*Some settings are managed by your organization
by
rlowe44
2 days, 16 hours ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
3 days, 4 hours ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
4 days ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
4 days, 9 hours ago -
AI slop
by
Susan Bradley
2 days, 3 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.