Computer Learning Zone CLZ Access Excel Word Windows

Imagination will often carry us to worlds that never were, but without it we go nowhere.

-Carl Sagan
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Seminars > Work Order > Lessons
Back to Work Order Lessons    Comments List
Lesson 44 Upload Images   Link   Email  
Lynda Chase      
2 years ago
when i run the record set to update the InvoiceT i get the following error Compile error.  User-defined type not defined.  It then hgighlights the line db As Database.
Scott Axton            
2 years ago
Check your typing / spelling.
You will probably have to post screenshots or snips of code.  There isn't enough information here to help you.
Lynda Chase      
2 years ago
Hi, thanks for your reply, this is the code:
    Dim db As Database
    Dim rs As Recordset
    Set db = CurrentDb()
    Set rs = db.OpenRecordset("InvoiceT", dbOpenDynaset)
    rs.AddNew
    rs!WorkOrderID = WorkOrderID
    rs!InvoiceDate = Date
    rs!IsPaid = False
    rs.update
    rs.Close
    Set rs = Nothing
    Set db = Nothing
    
        

End Sub
Kevin Robertson            
2 years ago
You may have a missing reference.
In the VB Editor go to Tools - References
Make sure the following is checked (see screenshot)

Microsoft Office 16.0 Access database engine Object Library
Kevin Robertson            
2 years ago

Lynda Chase      
2 years ago
Thank you, that fixed my problem.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Work Order Lessons.
 

 
 
 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 7/23/2024 1:44:20 AM. PLT: 1s