Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Membership Database    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Sub or Function Error Not Defined
Willie Germishuizen 
    
11 months ago
Good day,

anyone can give some advise on the error here below. How do i solve this?

Private Sub ProcessRenewalBtn_Click()
  Thank you
Willie
Adam Schwanz  @Reply  
           
11 months ago
Where's the rest of the code? Or is there no End Sub and you're trying to call the Thank You function?
Willie Germishuizen OP  @Reply  
    
11 months ago
Hi Adam, see below the rest of the code, thank you

DetailsDim NewRenewalDate As Date
  
  Me.OrderBy = "RenewalDate"
  Me.OrderByOn = True
  DoCmd.GoToRecord , , acFirst
  
   Status "Begin"
  
   While RenewalDate <= Date
  
        Select Case PeriodCombo
            Case "D"
                 NewRenewalDate = RenewalDate + NumPeriods
            Case "M"
                 NewRenewalDate = DateAdd("m", NumPeriods, RenewalDate)
                        
        End Select
  
    DoCmd.OpenForm "OrderF", , , , acFormAdd
    
    Forms!OrderF!CustomerCombo = CustomerCombo
    Forms!OrderF!OrderDate = Date
    Forms!OrderF!Description = "Membership Thru" & NewRenewalDate
    Forms!OrderF!IsPaid = False
    Forms!OrderF!ToBePrinted = True
    Forms!OrderF!IsQuote = False
    Forms!OrderF!Adress = Nz(DLookup("Adress", "CustomerT", "CustomerID=" & CustomerCombo), "")
    Forms!OrderF!Adress = Nz(DLookup("Province", "CustomerT", "CustomerID=" & CustomerCombo), "")
    Forms!OrderF!.Refresh
    
    Forms!OrderF!OrderDetailF!.Form!ProductID = ProductCombo
    Forms!OrderF!OrderDetailF!.Form!ProductName = Nz(DLookup("Description", "ProductT", "ProductID=" & ProductCombo), "")
    Forms!OrderF!OrderDetailF!.Form!UnitPrice = Amount
    Forms!OrderF!OrderDetailF!.Form!Quantity = 1
    Forms!OrderF!OrderDetailF!.Form.Refresh
    RenewalDate = DateAdd("m", 1, RenewalDate)
        
    DoCmd.Close acForm, "orderF", acSaveYes
    
    RenewalDate = NewRenewalDate
    Me.Requery
    
    Wend
    
    Status "Done"
    
      
    
    End Sub
Kevin Robertson  @Reply  
          
11 months ago
Which line does the code stop on?

I do see in your Subform references you are using both a Exclamation Point and a Period.
    Forms!OrderF!OrderDetailF!.Form.Refresh

Remove the extra Exclamation Points.
    Forms!OrderF!OrderDetailF.Form.Refresh

Value From Subform
Willie Germishuizen OP  @Reply  
    
11 months ago
Keven,
Thank you for your reply, I used the code in Richard's Tech Help Extended Cut (Access Membership Database. Recurring Billing)
Will go through it and compare my code, must have made a mistake or more.

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

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/22/2026 2:05:08 AM. PLT: 1s