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, 5 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
-
Windows 10 filehistory including onedrive folder
by
Steve Bondy
1 hour, 46 minutes ago -
pages print on restart (Win 11 23H2)
by
cyraxote
1 hour, 1 minute ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
3 hours, 57 minutes ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
3 hours, 59 minutes ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
11 hours, 20 minutes ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
1 hour, 3 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
22 hours, 41 minutes ago -
How much I spent on the Mac mini
by
Will Fastie
1 hour, 13 minutes ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
4 hours, 35 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
1 day, 4 hours ago -
Setting up Windows 11
by
Susan Bradley
6 hours, 56 minutes ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
1 day ago -
Powershell version?
by
CWBillow
1 day ago -
SendTom Toys
by
CWBillow
9 hours, 10 minutes ago -
Add shortcut to taskbar?
by
CWBillow
1 day, 4 hours ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
1 day, 21 hours ago -
How can I install Skype on Windows 7?
by
Help
1 day, 19 hours ago -
Logitech MK850 Keyboard issues
by
Rush2112
1 day, 2 hours ago -
We live in a simulation
by
Alex5723
2 days, 11 hours ago -
Netplwiz not working
by
RetiredGeek
1 day, 21 hours ago -
Windows 11 24H2 is broadly available
by
Alex5723
2 days, 23 hours ago -
Microsoft is killing Authenticator
by
Alex5723
1 hour, 36 minutes ago -
Downloads folder location
by
CWBillow
3 days, 6 hours ago -
Remove a User from Login screen
by
CWBillow
2 days, 1 hour ago -
TikTok fined €530 million for sending European user data to China
by
Nibbled To Death By Ducks
2 days, 21 hours ago -
Microsoft Speech Recognition Service Error Code 1002
by
stanhutchings
2 days, 21 hours ago -
Is it a bug or is it expected?
by
Susan Bradley
23 hours, 28 minutes ago -
Image for Windows TBwinRE image not enough space on target location
by
bobolink
2 days, 20 hours ago -
Start menu jump lists for some apps might not work as expected on Windows 10
by
Susan Bradley
1 day, 19 hours ago -
Malicious Go Modules disk-wiping malware
by
Alex5723
3 days, 10 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.