troubleshooting Question

Access VBA How To Check a Table To See If The Field Value Is Null

Avatar of Dustin Stanley
Dustin Stanley asked on
Microsoft AccessVBA
6 Comments2 Solutions426 ViewsLast Modified:
I have a form and in that form I have a textbox after I update the value in the unbound textbox I want to check a table to see if the field value is Null

Form is called frmHomePage

Textbox is called SKU

Table I am checking is called SKUs and the field is called SkuLength

I am checking on [SKUs].[SKU] = [Forms]![frmHomePage]![SKU]

So far the code I have is this but it is not working:

Dim SKUid As String

SKUid = [Forms]![frmHomePage]![SKU]

If DCount(1, "SKUS", "IsNull([SkuLength] WHERE [SKUs].[SKU] = SKUid)") > 0 Then
MsgBox "Has nulls"
Else
MsgBox "Complete!"
End If

Thanks for the help.
ASKER CERTIFIED SOLUTION
Kelvin Sparks

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros