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 Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
VBA Not Working
Carl Bush 
    
2 years ago
Can anyone help please I'm pulling my hair out I have a add new customer form which I have redesigned but my VBA code doesn't work in the new form it's exactly the same in both forms the original works the new one doesn't. I have even made a copy of the original form which again doesn't work.
My code in the button on the add new customer form is
Me.Refresh
     DoCmd.OpenForm "QuoteF", , , "CustomerID=" & CustomerID, acFormAdd
     OpenCustomerQuote

The last line is a sub to disable the quote no and customer combo on the Quotef when it's opened. On the original add new customer form when the add new button is clicked quote form opens and the customer combo gets populated from the add new customer form but the new form and the copy of the original it doesn't get the customer name.
I just don't know what going on
Regards
Carl
Adam Schwanz  @Reply  
           
2 years ago
Did you have default value before? Default Value

Normally I just set the CustomerID to Forms!AddCustomerF!CustomerID for the default value
John Davy  @Reply  
         
2 years ago
Rick's Troubleshooter

John
Carl Bush OP  @Reply  
    
2 years ago
Hi Adam i just worked it out I had a default value in customer combo on the Quote Form which was set to the old form name I feel such a dick I came back to delete the comment before anyone saw it but you got there first thanks very much for answering the question as always you guys are the best
Regards
Carl

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

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: 5/6/2026 9:23:29 PM. PLT: 1s