Access 2007-2019
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
 
Home   Courses   Seminars   Templates   Help   TechHelp   Forums   Contact   Join   Order   Logon  
 
 
Microsoft Access Developer 9
By Richard Rost   Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   3 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 
17 days ago
Hello,

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?
Read More...
Adam Schwanz
17 days 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
C = DCOUNT
If C = 0 Then
ElseIf C=1 Then
ElseIf C=2 Then
etc...

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
etc.

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
17 days 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.
 
Subscribe
 

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

11/30/2021Import Multiline Cells
11/30/2021Adam's Access Games
11/29/2021Prevent Close
11/28/2021Random
11/22/2021Currency Symbols
11/13/2021Access Developer 36
11/13/2021Access Developer 36 Lessons
11/13/2021Access Developer 36
11/13/2021Control Tip Text
11/11/2021Link to Excel
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
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
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
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