Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer 3    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Developer 3 Lesson 1
Ken Wykoff 
       
4 months ago
I am hoping that someone can show me if I have this right or how to correct it. I am not sure it is doing what it is supposed to do. In my code, when I hit the log button for CommissionT, the message box shows 0 and does not log the information to CommissionT. I did the error lines as well, so I'm not sure. In the line of coding where it shows:  ID = DLookup("CommissionID", "CommissionTxt", "EmployeeID=" & SalesRepCbo & _
        " AND SaleDateTxt=#" & SaleDateTxt & "# AND SaleAmountTxt=" & SaleAmountTxt), are both SaleDate and SaleAmount supposed to be referenced as txt since I have them named that in the Property Sheets?
Ken Wykoff OP  @Reply  
       
4 months ago

Ken Wykoff OP  @Reply  
       
4 months ago

Ken Wykoff OP  @Reply  
       
4 months ago

Kevin Robertson  @Reply  
          
4 months ago
The second argument should be the name of your Table or Query.
Ken Wykoff OP  @Reply  
       
4 months ago
Ok I will change that now and try again. Thanks again
Ken Wykoff OP  @Reply  
       
4 months ago
Kevin Kevin if this is what you meant, it didn't work. Showed a 0 in the message box and still did not log into the CommissionT
Ken Wykoff OP  @Reply  
       
4 months ago
ID = DLookup("CommissionID", "CommissionTxt", "EmployeeID=" & SalesRepCbo & _
        " AND SaleDate=#" & SaleDateTxt & "# AND SaleAmount=" & SaleAmountTxt)
Kevin Robertson  @Reply  
          
4 months ago
I am assuming the name of your table is CommissionT, and not CommissionTxt.

ID = DLookup("CommissionID", "CommissionT", "EmployeeID=" & SalesRepCbo & _
        " AND SaleDate=#" & SaleDateTxt & "# AND SaleAmount=" & SaleAmountTxt)


If you comment out the On Error lines you will most probably get an error (can't find the Table).
Ken Wykoff OP  @Reply  
       
4 months ago
Kevin  You are correct table is CommissionT.  I just placed the code you shared and replaced what I had and it still shows up the 0 in a message box and does not log it into the table. I cannot figure out how things always work for Richard in the learning videos and even though I find no spelling issues, it still won't work for me. I wonder if I would just copy the entire coding on his AFTER video and place it into mine to see if it worked?
Ken Wykoff OP  @Reply  
       
4 months ago
Kevin, I looked at the code Richard had and I noticed a few things that were different and once I changed my code to match the extra things it all worked. Still at a loss as to why I had the troubles with it when his videos did not, but it is working now. Thanks again for your time and effort.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer 3.
 

Next Unseen

 
New Feature: Comment Live View
 
 

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: 4/30/2026 6:32:10 PM. PLT: 0s