I have a form where I need to make sure a field is not blank. The field on the form is SpecID which has a dropdown list to select initials of the person. I created a table of initials with SpecID as the Primary key. I used this key in another table and used the Lookup wizard to make a combo box of initials. Now on the form I want to make sure the people select their initials. I have tried making it a required field in the table and I have tried creating a macro that says if SpecID is Null – cancel event – display message and Gotocontrol. That doesn’t work either. Is there any way to make sure this field is not blank????
![]() |
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 |
-
Required Field
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Required Field
- This topic has 4 replies, 3 voices, and was last updated 23 years, 10 months ago.
Viewing 0 reply threadsAuthorReplies-
WSMarkLiquorman
AskWoody LoungerJune 11, 2001 at 12:45 pm #529039If you’ve made the field Required in your table, then you should not be able to move off the record (which causes an immediate update for a bound form) if nothing has been selected. Are you trying to prevent them from leaving that field without making a selection? I would advise against that. You can also put in code in your form’s BeforeUpdate event. Check that field for IsNull, if true, then set “Cancel=True” and “Exit Sub”.
-
WSLindaR
AskWoody LoungerJune 11, 2001 at 1:10 pm #529041I attached the macro to the BeforeUpdate event of the form. When I test the field by leaving it blank, it lets me create a record even though that field is blank. I even have it as a required field in the table but I leave it blank and it lets the record go through. Does it have something to do with the fact that I used a wizard to create the dropdown list?
-
WSMarkLiquorman
AskWoody Lounger -
WSEmilia
AskWoody LoungerJune 17, 2001 at 4:43 pm #529801Linda,
It shouldn’t have anything to do with the wizard. I first thought, using a macro and not an event procedure for the BeforeUpdate event could be the culprit (I never use macros for events). Now I just tested such a macro and it works. It doesn’t let me save the record even if the table field is not required and the NotInList procedure is not bothering. So it must be something else. Are you sure you can save records with that field empty after editing? Existing records with SpecID empty will remain so if there is no change in the record, because neither form’s BeforeUpdate nor ctlSpecID’s NotInList fires then.
Maybe you can post your macro commands here in some form, although an event procedure would be much better.
BTW, LimitToList=True itself does allow an empty field in A97 and A2K. But you should set it anyway, otherwise the users could enter initials not contained in your table.
-
-
Viewing 0 reply threads -

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
-
24H2 Installer – don’t see ption for non distructive install
by
JP
4 hours, 10 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
10 hours, 22 minutes ago -
How much I spent on the Mac mini
by
Will Fastie
5 hours, 11 minutes ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
2 hours, 10 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
16 hours, 14 minutes ago -
Setting up Windows 11
by
Susan Bradley
3 hours, 25 minutes ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
11 hours, 42 minutes ago -
Powershell version?
by
CWBillow
12 hours, 35 minutes ago -
SendTom Toys
by
CWBillow
7 hours, 15 minutes ago -
Add shortcut to taskbar?
by
CWBillow
16 hours, 31 minutes ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
1 day, 8 hours ago -
How can I install Skype on Windows 7?
by
Help
1 day, 7 hours ago -
Logitech MK850 Keyboard issues
by
Rush2112
14 hours, 30 minutes ago -
We live in a simulation
by
Alex5723
1 day, 23 hours ago -
Netplwiz not working
by
RetiredGeek
1 day, 9 hours ago -
Windows 11 24H2 is broadly available
by
Alex5723
2 days, 11 hours ago -
Microsoft is killing Authenticator
by
Alex5723
23 hours, 4 minutes ago -
Downloads folder location
by
CWBillow
2 days, 17 hours ago -
Remove a User from Login screen
by
CWBillow
1 day, 13 hours ago -
TikTok fined €530 million for sending European user data to China
by
Nibbled To Death By Ducks
2 days, 9 hours ago -
Microsoft Speech Recognition Service Error Code 1002
by
stanhutchings
2 days, 9 hours ago -
Is it a bug or is it expected?
by
Susan Bradley
11 hours, 9 minutes ago -
Image for Windows TBwinRE image not enough space on target location
by
bobolink
2 days, 8 hours ago -
Start menu jump lists for some apps might not work as expected on Windows 10
by
Susan Bradley
1 day, 7 hours ago -
Malicious Go Modules disk-wiping malware
by
Alex5723
2 days, 21 hours ago -
Multiple Partitions?
by
CWBillow
2 days, 22 hours ago -
World Passkey Day 2025
by
Alex5723
18 hours, 41 minutes ago -
Add serial device in Windows 11
by
Theodore Dawson
4 days, 7 hours ago -
Windows 11 users reportedly losing data due forced BitLocker encryption
by
Alex5723
2 days, 7 hours ago -
Cached credentials is not a new bug
by
Susan Bradley
4 days, 11 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.