Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Adding to an autonumber field to make a third fiel
Bob Mandrell 

15 years ago
I tried this several times with the same result each time.  I typed the VBA code into the expression builder and pressed "OK".  I then saw the code in the Before Insert line of the form properties.  Each line is separated by a square box.  I saved the database and closed the properties.


I then went back to form view and tried to add a new record.  I got the following error message:

Microsoft Office Access can't find the macro 'Private Sub Form_BeforeInsert (Cancel As Integer) JobNumber=Nz(DMax("JobNumber", "JobsT"))+1
The macro (or its macro group) doesn't exist, or the macro is new but hasn't been saved.  Note that when uyou enter the macrogroupname.macroname sytax in an argument, you must specify the name the macro's macro group was last saved under.

I am doing something wrong here but I don't know what it is.  I am using Access 2003.  Any suggestions?

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: 8/11/2026 5:14:09 AM. PLT: 0s