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 
For Date Format
Yashkumar Maradiya 
    
4 years ago
i will type date value in format dd/mm/yyyy or dd/mmm/yyyy, and calculate value return me different please give me solution

VBA Code:
Private Sub Command6_Click()
Dim paymentamount As Currency, totalpaid As Currency, x As Long, curdate As Date

If MsgBox("Are you sure?", vbYesNoCancel) <> vbYes Then Exit Sub
'clear existing payment schedule
CurrentDb.Execute "DELETE FROM LoanpaymentT WHERE LoanID=" & LoanID
'Loanpayments
paymentamount = LoanAmount
totalpaid = 0
curdate = StartDate
For x = 1 To Nummonth
    'If x = Nummonth Then paymentamount = LoanAmount - totalpaid
CurrentDb.Execute "INSERT INTO LoanPaymentT (LoanID, PaymentDate,paymentamount)" & _
        "Values(" & LoanID & ",#" & curdate & "#, " & paymentamount & ")"
    curdate = DateAdd("m", 1, curdate)
    'totalpaid = totalpaid + paymentamount
    
    Next
    
    LoanPaymentF.Form.Requery
Yashkumar Maradiya OP  @Reply  
    
4 years ago

Yashkumar Maradiya OP  @Reply  
    
4 years ago
please give me solution
Alex Hedley  @Reply  
           
4 years ago
What is your question?
Kevin Robertson  @Reply  
          
4 years ago
I think it's another case of the difference in date formats between U.S. and other formats although not totally sure and the screenshot is no help.

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/9/2026 1:12:02 AM. PLT: 1s