Here I am again – trying to do something that seems obvious but apparently not. On the After Update event of date field on a form I attached a macro. In the condition area I have [Bkcomdate] < [dateindept]. Then I have cancelEvent, MsgBox (which says Book Complete Date must be greater than Date in Department), and gotocontrol (bkcomdate). No matter what date I put in bkcomdate, that message appears. What condition should I put to make this happen. Thank you for your time and patience.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Macro (Access 97)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Macro (Access 97)
- This topic has 6 replies, 6 voices, and was last updated 22 years, 4 months ago.
Viewing 1 reply threadAuthorReplies-
WSaccdb
AskWoody Lounger -
WSDouglas Martin
AskWoody LoungerNovember 19, 2002 at 3:27 pm #632840As implied by accdb, code is easier for us to help you with than macros. However, one this to keep in mind is that a null value always compares false against any other value. So, check [dateindept]. If it is null at the time you are entering the data into [bkcomdate], then you’ll get your validation message.
If that’s the problem, either ensure that [bkcomdate] is not null, or use something like [dateindept] is null or [bkcomdate]<[dateindept]
-
WSLindaR
AskWoody LoungerNovember 19, 2002 at 4:01 pm #632847OK, how would I write code for the after update event of the field bkcomdate so that if that date is not greater than the dateindept a message appears stating that the book complete date must be greater than the date in department. I thought a macro would be easier for me to write than code.
-
WSHansV
AskWoody LoungerNovember 19, 2002 at 4:35 pm #632860You need to use the BeforeUpdate event, for the AfterUpdate event can’t be canceled.
Your code could lool like this:
Private Sub txtBkComDate_BeforeUpdate(Cancel As Integer)
If txtBkComDate < txtDateInDept Then
MsgBox "BkComDate must be on or after DateInDept."
Cancel = True
End If
End Sub -
WSpatt
AskWoody Lounger -
WScharlotte
AskWoody Lounger
-
-
-
Viewing 1 reply thread -

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
-
Boot Sequence for Dell Optiplex 7070 Tower
by
Serge Carniol
23 minutes ago -
OTT Upgrade Windows 11 to 24H2 on Unsupported Hardware
by
bbearren
1 hour, 20 minutes ago -
Inetpub can be tricked
by
Susan Bradley
2 hours, 40 minutes ago -
How merge Outlook 2016 .pst file w/into newly created Outlook 2024 install .pst?
by
Tex265
1 hour, 49 minutes ago -
FBI 2024 Internet Crime Report
by
Alex5723
5 hours, 10 minutes ago -
Perplexity CEO says its browser will track everything users do online
by
Alex5723
2 hours, 34 minutes ago -
Login issues with Windows Hello
by
CWBillow
16 hours, 15 minutes ago -
How to get into a manual setup screen in 2024 Outlook classic?
by
Tex265
4 hours, 9 minutes ago -
Linux : ARMO rootkit “Curing”
by
Alex5723
1 day, 3 hours ago -
Employee monitoring app leaks 21 million screenshots in real time
by
Alex5723
1 day, 3 hours ago -
Google AI is now hallucinating idioms
by
Alex5723
1 day, 4 hours ago -
april update
by
69800
6 hours, 37 minutes ago -
Windows 11 Insider Preview build 27842 released to Canary
by
joep517
1 day, 5 hours ago -
Quick Fix for Slowing File Explorer
by
Drcard:))
1 day, 5 hours ago -
WuMgr not loading?
by
LHiggins
1 hour, 17 minutes ago -
Word crashes when accessing Help
by
CWBillow
9 hours, 37 minutes ago -
New Microsoft Nag — Danger! Danger! sign-in to your Microsoft Account
by
EricB
1 day, 5 hours ago -
Blank Inetpub folder
by
Susan Bradley
1 day, 2 hours ago -
Google : Extended Repair Program for Pixel 7a
by
Alex5723
1 day, 15 hours ago -
Updates seem to have broken Microsoft Edge
by
rebop2020
1 day, 2 hours ago -
Wait command?
by
CWBillow
1 day, 8 hours ago -
Malwarebytes 5 Free version manual platform updates
by
Bob99
1 day, 22 hours ago -
inetpub : Microsoft’s patch for CVE-2025–21204 introduces vulnerability
by
Alex5723
2 days, 4 hours ago -
Windows 10 finally gets fix
by
Susan Bradley
2 days, 13 hours ago -
AMD Ryzen™ Chipset Driver Release Notes 7.04.09.545
by
Alex5723
2 days, 15 hours ago -
How to use Skype after May?
by
Joann
23 hours, 30 minutes ago -
Win 7 MS Essentials suddenly not showing number of items scanned.
by
Oldtimer
2 days, 9 hours ago -
France : A law requiring messaging apps to implement a backdoor ..
by
Alex5723
3 days, 4 hours ago -
Dev runs Windows 11 ARM on an iPad Air M2
by
Alex5723
3 days, 5 hours ago -
MS-DEFCON 3: Cleanup time
by
Susan Bradley
1 hour, 31 minutes 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.