Access 2007-2019
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
Microsoft Access Developer 9
By Richard Rost   Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   4 years ago

Microsoft Access TutorialsAccess Developer 9 continues our in-depth study of Visual Basic for Applications programming with Microsoft Access (Access VBA). This course will continue our coverage of partial payments on invoices, and we will begin work on the Test Taker Database. If you're serious about building quality databases with Access, and you want to learn how to automate your database with VBA, then don't miss out on this course. Contents include:

- Add Search Form to Main Menu
- Fixing Delete a Payment Problem
- Lock or Unlock if Invoice Paid
- Test Taker Database, Part 1
- Table Setup, Relationships, Ref Integrity
- Dept, Class, Test, Question, Answer
- Multiple Choice v. Fill in the Blank
- Continuous Form with Cont Subform
- Begin Taking Test, Save All Results
- Lots more

Click here for more information on Access Developer 9, including a course outline, sample videos, and more. This course was recorded using Access 2016, but most of the topics covered are valid for all versions of Access from 2003 on. This class follows Developer Level 8. The next class in the series is Developer Level 10.

DCount Variable vs IF DCount Upload Images   Link  
Keith Stanton 
2 months ago

Is there a reason that I have either forgotten or we haven't been taught yet that we assign a value to a variable vs performing the DCount right in the IF statement?

Why this?
Adam Schwanz
2 months ago
You can use whichever, using variables is usually a lot more flexible/friendly. You can save a value for later use, change the value of the variable, or use them to not have to repeat code.

Lot easier to say
If C = 0 Then
ElseIf C=1 Then
ElseIf C=2 Then

Then to do
If Nz(DCount("*", "QuestionT", "TestID=" & TestCombo), 0) = 0 Then
ElseIf Nz(DCount("*", "QuestionT", "TestID=" & TestCombo), 0) = 1 Then
ElseIf Nz(DCount("*", "QuestionT", "TestID=" & TestCombo), 0) = 2 Then

There's also the whole running through loops, you can do C=C+1 because it can change/save the value, you can't do Nz(DCount("*", "QuestionT", "TestID=" & TestCombo), 0) = Nz(DCount("*", "QuestionT", "TestID=" & TestCombo), 0) + 1 more than once. Variables are just better ;)
Adam Schwanz
2 months ago
Actually, I don't think you can do that DCOUNT = DCOUNT at all, but you get the point.
Add a Reply

Start a NEW Conversation
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.

You may want to read these articles from the 599CD News:

1/22/2022Next Appointment
1/18/2022Access B2 Upgrade
1/17/2022Access Beginner 2 Links
1/17/2022Access Beginner 2
1/17/2022New Record on Top
1/13/2022Missing References
1/13/2022Access Beginner 1 Links
1/11/2022Access Fast Tips
1/11/2022System Defaults

Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
My Account
My Courses
Lost Password
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Customer Support
Web Site Tour
Consulting Services
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Contact Info
Support Policy
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
Keywords: access vba payments test taker  Page Tag: whatsnew  PermaLink