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 
Order Subform
Richard Van Wagoner 
      
2 years ago
I am having trouble with some code in a command button in a form. I with include some screenshots of the code. I am following along with Richard in Developer lesson 1 on modifying some macros. I wasn't having any trouble until the last bit of code where it sets the product name, and unit price. And when I added this for some reason the first bit doesn't work now with the msgbox. The way that this acts is when you choose a product from the combo box it inserts the correct Product ID but nothing else and moves to the next row To the quantity field. I have checked the code against what is in the video and it looks indentical to Richard's except the taxable portion which I am not using in my form. What have I missed?
Richard Van Wagoner OP  @Reply  
      
2 years ago

Richard Van Wagoner OP  @Reply  
      
2 years ago

Kevin Robertson  @Reply  
          
2 years ago
Check the Default Value. Is it Null or 0?
Richard Van Wagoner OP  @Reply  
      
2 years ago
In the OrderdetailsT all numerical values were set to 0 I changed that to null now I get the msgbox to work but the subform is still the same.
Richard Van Wagoner OP  @Reply  
      
2 years ago

Michael Duncan  @Reply  
     
2 years ago
Hi,

I saw your code it looks like you may have the GoToControl and the GoToRecord reversed. I have the same code in my database with GoToRecord first then the GoToControl.
Richard Van Wagoner OP  @Reply  
      
2 years ago
Hi Michael,
I seen your post and I reversed them still no success, Still have the same problem.
Kevin Yip  @Reply  
     
2 years ago
Hi Richard, your combo box is bound to the same field that the subform product id field is bound to.  If they are bound to the same field, they will always have the same value.  If the combo box is null, so is the field in the subform, as shown in your last screenshot.  And if the combo is null, then of course the Column property's value is null too.  Maybe your combo should be unbound.
Richard Van Wagoner OP  @Reply  
      
2 years ago
Hi Kevin, I changed to combo box to be unbound. Now the cursor and all things are in the right place but still it will not insert the product name or the unit price in the subform.
Kevin Robertson  @Reply  
          
2 years ago
Have you tried using a Recordset instead? Then Requery the Subform.
Richard Van Wagoner OP  @Reply  
      
2 years ago
No I have Just decided to start over with the Database. I have deleted all queries and forms and will start over.

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 11:23:20 AM. PLT: 0s