Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Home > Access > VQ46 < VQ45 | VQ47 >

Access Video Quiz D3.1

By Richard Rost   Richard Rost on LinkedIn Email Richard Rost   9 hours ago

DLookup Null Assignment to Long Variable


 S  M  L  XL  FS | Slo Reg Fast 2x Join Now

Why should you explicitly declare a variable with DIM in VBA? Welcome to another Microsoft Access Video Quiz. You will be asked five Developer-level questions about VBA variables, default values, checking for duplicate records, handling Null values returned by DLookup, and responding to message box choices. Answer each question, check your score, and see how well you know Access VBA.

Recommended Courses

Want More?

Keywords

Access Video Quiz, VBA variables, DIM statement, VBA data types, Long variable default value, DLookup Null error, Nz function, duplicate record check, MsgBox Yes No Cancel, vbYes condition

 

 

 

 

More Information
Transcript 
Welcome to another video quiz from Access Learning Zone.

This one's developer level, with 5 questions about working with variables in VBA.

You'll have 3 seconds for each question. Feel free to hit the pause button if you need more time. Keep track of your score. Let's head on to the grid and see how your code holds up.

Question 1.

Why should you explicitly declare a variable with DIM in VBA?

It permanently saves the value in a table, it establishes a variable and allows you to specify its data type, it automatically creates a matching form control, it makes the variable available to every procedure.

That is B. It establishes a variable and allows you to specify its data type.

Question 2.

A variable is declared as Long and hasn't been assigned a value. What does it contain?

Null, empty string, zero, or the last value stored in memory.

That's going to be zero, but don't rely on it. Always initialize your variables.

Question 3.

You're checking for a duplicate sale using employee, date, and amount.

What makes the check reliable?

Match the employee ID only, match the date and amount only, match any one of the three fields, match all three fields in the same record.

You're going to match all three fields in the same record.

Question 4.

DLookup returns Null when no matching record exists.

What happens if you assign that Null directly to a Long variable without handling the error?

VBA raises an invalid use of Null error, the variable becomes negative 1, VBA converts Null into zero, the matching record is deleted.

That's going to be VBA raises an invalid use of Null error. Make sure you wrap it in Nz.

And question 5.

In VBA, you display a message box with Yes, No, and Cancel buttons.

You want your code to continue only if the user clicks Yes. Which condition should you use?

There's four conditions to pick from. You pick it and let me know.

It's going to be option B, my reply equals VBA.

All right, how'd you do?

Did you get 5 out of 5?

Are you the programmer who mastered the grid and saved the program?

Or the one who brought the joystick to the code review?

Well, if you missed any of these topics, more are covered in Microsoft Access Developer Level 3. We work with variables, check for possible duplicate records, and respond to choices your users make.

You'll find links below.

Thanks for playing. Post your score in the comments down below, and don't leave your variables behind on the grid.

Until next time, live long and prosper.
Intro 
Why should you explicitly declare a variable with DIM in VBA? Welcome to another Microsoft Access Video Quiz. You will be asked five Developer-level questions about VBA variables, default values, checking for duplicate records, handling Null values returned by DLookup, and responding to message box choices. Answer each question, check your score, and see how well you know Access VBA.
 
 
What's This?

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 11/9/2026 6:19:06 PM. PLT: 1s
Keywords: Access Video Quiz, VBA variables, DIM statement, VBA data types, Long variable default value, DLookup Null error, Nz function, duplicate record check, MsgBox Yes No Cancel, vbYes condition  PermaLink  What Happens Assigning DLookup Null to a Long Variable in Microsoft Access? Video Quiz D3.1