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 
Creating Templates in Invoicing System
Bradley Neumann 
      
4 months ago
Hello,
I am honestly not sure where to post this question so I'll just take a shot and post it here. I'm using a version of the Invoicing template that Richard taught how to build in various videos. I have the product selection combo box added to put things on an order as well from one of the extended videos. I'm trying to do something similar to the Load/Save Template concept that was in the Fitness video series around 60-62 but the more I try the more confused I get.

I have various computer systems that build over and over again and I would like to save them as Templates so I can bring them back up for orders/estimates rather than recreating them all the time. I may also have a circumstance where I have a customer want the exact same system that someone else purchased so I'd like to copy the contents of that invoice/build to a new one. Can anyone point me in the right direction to learn how to do this ?

Thanks for your time,
Brad
Joe Holland  @Reply  
      
4 months ago
Copy records video: https://599cd.com/blog/display-article.asp?ID=2120

Copy records with related child records: https://599cd.com/blog/display-article.asp?ID=1521
Bradley Neumann OP  @Reply  
      
4 months ago
Hi Guys,
I got the copy order function to work from Developer 24 but I'm bound and determined to figure out a way to implement templates with a combo box selector the way Richard did in Fitness 60 and 61./ I'm using a slightly modified version of the Invoicing System. I can get the Order Details to save to a template table but when I load them back the OrderID goes back to whatever order ID I saved the record from. I am probably making this harder than it needs to be but I want to learn how to do it. right. Any help is appreciated.
Joe Holland  @Reply  
      
4 months ago
Don't save the OrderID with your template. When you paste the template to a new order, the OrderID will automatically be created with the new order.
Bradley Neumann OP  @Reply  
      
4 months ago
It appears when I try to do that that the order gets saved as order ID 0 in the table so itnever shows up. Like I mentioned, I'm using a slightly modified version of the order entry system that Richard teaches how to make in the tech help videos. What I want to do is create templates that can be loaded into the order details section of the form after a customer has been chosen. I have the functionality of simply copying the order from another customer to a new record and then just changing the customer name to the new one. Doing that works, but I really would like to do it with a combo box to select the template etc. I just want to learn how to do this because I feel the additional knowledge would be useful for me down the road. I know I'm missing something probably very easy but I don't know what it is.
Joe Holland  @Reply  
      
4 months ago
Since you have an open order with a customer chosen, you should have an OrderID. Set the OrderID to the order ID on the open form.
Bradley Neumann OP  @Reply  
      
3 months ago
Joe Hi Joe , Thanks for the help I've gotten the save Template function to work with a combo box selector but every time I load the template it assigns the new order ID to 0 even though there is already an ID assigned on the form.  

Here is my Load VBA ... what am I doing wrong? How can I get the proper OrderID to get pulled from the form and still use the template data ?

' Load Template data

Dim rsIn As Recordset, rsOut As Recordset, db As Database, NewID As Long
Set db = CurrentDb
Set rsIn = db.OpenRecordset("SELECT * FROM OrderDetailTemplateT " & _
    "WHERE OrderDetailTemplateNameID=" & OrderTemplateCombo)
Set rsOut = db.OpenRecordset("OrderDetailT")
While Not rsIn.EOF
    rsOut.AddNew
    rsOut!ProductID = rsIn!ProductID
    rsOut!ProductName = rsIn!ProductName
    rsOut!Quantity = rsIn!Quantity
    rsOut!UnitPrice = rsIn!UnitPrice
    rsOut!Notes = rsIn!Notes
    rsOut.Update
    rsIn.MoveNext
    Wend
    rsIn.Close
    Set rsIn = Nothing
    
    Set db = Nothing
    
    Me.Requery
    
End Sub

If I could add a screenshot I would

Thanks for your time,
Brad
Joe Holland  @Reply  
      
3 months ago
Msgbox the orderID after "Set rsOut = db.OpenRecordset("OrderDetailT")" and see if your code can read it at that point. (MsgBox "OrderID is " & Forms!FormName!OrderID). If it shows 0 here, try the same msgbox after rsOut.Update.
Bradley Neumann OP  @Reply  
      
3 months ago
Hi Joe,
Thanks for the help, I added the message box as you recommended and after seeing the results I tried adding rsOut!OrderID = Forms!OrderF!OrderID after rsOut.AddNew. That works bit after it loads the it clears the filter and puts me on the first order for that customer instead of the one I just created. How can I get it to either stay on or go back to the record I just made? I swear I'm seeing a light at the end of the tunnel.... I'm just hoping it's not a train.

I sincerely thank you all for your insight as I'm still learning this and someday hope to return the favor to other users.

Brad
Joe Holland  @Reply  
      
3 months ago
Bradley Maybe you can change Me.Requery to Me.Recordset.Requery. If that does not solve your problem, try these videos or any video he has on bookmarks of the recordset. You set the rs bookmark and then open the form and set Me.Bookmark = rs.Bookmark.

Requery and stay on the correct record: https://599cd.com/blog/display-article.asp?ID=2645

RecordsetClone video: https://599cd.com/blog/display-article.asp?ID=3688

AddNew record extended cut: https://599cd.com/blog/display-article.asp?ID=3677
Bradley Neumann OP  @Reply  
      
3 months ago
The Me.Recordset.Requery worked perfectly. I almost feel like it is a EUREKA moment. Thanks again for the help.
Joe Holland  @Reply  
      
3 months ago
Bradley it was my pleasure. It always feels good to help. I have been in your shoes where I know I can get it to work, but I am missing something simple. Congratulations and making it work!

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 2:40:34 PM. PLT: 0s