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 
Change date to text
John Miller 

6 years ago
Richard, I have a problem, in an invoice we generate for monthly billing I can use the following

format(forms!getdaterange!endingdate,mmddyy) & (code)

the code being a code assigned to each client. I want to use the same invoice to store in a field in our orders table. Cant seem to make it work when I try calling the invoice number from the invoice itself it says that field does not exist. Any ideas other than using VBA to accomplish this?
Richard Rost  @Reply  
          
6 years ago
Hi John. I'm assuming that you just typed this in to the web site and didn't copy and paste it. Your function should be:

format(forms!getdaterange!endingdate,"mmddyy") & [code]

I don't think code is a reserved word in Access, but you never know. If you're not sure, best to enclose it in square brackets.

I need to know more about where you're using this to help you. In a query? "Calling the invoice number from the invoice itself" doesn't help me much. I need more details. Without seeing your database you have to be as descriptive as possible.
Alex Hedley  @Reply  
           
6 years ago
Reserved Words from the Glossary
Richard Rost  @Reply  
          
6 years ago
Nice. See, you've got stuff in there even I haven't seen. LOL
Alex Hedley  @Reply  
           
6 years ago
You haven't memorised all 200 glossary items? Shocking :p
John Miller OP  @Reply  

6 years ago
Richard sorry I had just typed the function in and just messed up on syntax. This function creates the invoice number that appears on the physical invoice to be sent to client. It is tied to an unbound field called "invno". As each invoice is generated this field is populated via the function "format(forms!getdaterange!endingdate....)" . What I am trying to do is to figure out how to get the invoice number either into the orders table or into a separate table so that a particular invoice can be recalled without having to know the exact day it was run. When I try to reference the invoice number on the invoice itself, it keeps saying that the field is not found. The only way I can get it to work is to create VBA code run at the end of each invoice. Is this the best way to handle this?
Hope this helps.
Richard Rost  @Reply  
          
6 years ago
Yep. When the invoice is entered, I would create a text box on the form that has a default value set to that code. If that doesn't work, then you could make an AfterUpdate event for the InvNo field so when you type that in, it updates the other field.

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 8:49:22 AM. PLT: 2s