Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Home > Forums > Access Forum > Load Form Issue by David Clement
Back to Access Forum    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
Load Form Issue
David Clement 
      
25 hours ago
Good afternoon Richard,
I have a Load From Issue I hope is easy to fix.
Using custom navigation buttons like you taught us, can you tell me what I might have done wrong here?

Private Sub From_Load()
    DoCmd.GoToRecord,,acNewRec
End Sub


The form doesn't load right when I use that Sub.

Thank you.
David Clement OP  @Reply  
      
25 hours ago

David Clement OP  @Reply  
      
25 hours ago
There is actualy a space there after Record
David Clement OP  @Reply  
      
25 hours ago
Private Sub Form_Current()
   ' RecCountBox = Me.Recordset.RecordCount
    RecCountBox = Me.Recordset.AbsolutePosition + 1 & " of " & Me.Recordset.RecordCordset
End Sub


Private Sub Form_Load()
    DoCmd.GoToRecord , , acNewRec
End Sub
David Clement OP  @Reply  
      
25 hours ago

Donald Blackwell  @Reply  
       
25 hours ago
In Form_Current, RecCountBox = the last variable should be Me.Recordset.RecordCount not Me.Recordset.RecordCordset

Aside from that, have you done a Debug Compile? That may be enough to stop Access from compiling the VBA and running.
Richard Rost  @Reply  
          
24 hours ago
Yep, Donald found the typo. 'RecordCordset' should be 'RecordCount'. Run Debug > Compile after fixing that, because a compile error elsewhere in the form's module can keep your event procedures from running properly.

Also, make sure the event procedure is named 'Form_Load', not 'From_Load'. Your later post has it correct.
David Clement OP  @Reply  
      
21 hours ago
I Debugged and it still won't open to the new record.


Private Sub Form_Current()
   ' RecCountBox = Me.Recordset.RecordCount
    RecCountBox = Me.Recordset.AbsolutePosition + 1 & " of " & Me.Recordset.RecordCount

    
    
End Sub




Private Sub Form_Load()
    DoCmd.GoToRecord , , acNewRec
End Sub

It's okay.
Thank you!
Donald Blackwell  @Reply  
       
19 hours ago
Do you have any other code that runs between/after the Form_Load and Form_Current Events that might be moving the record pointer?

And also, verify in the your form's Event tab in design view that it has [Event Procedure] next to the On Load and On Current Events. Since you changed one or more names, it may not be there. If not, you can either choose it from the drop down on that line or just double-click that line until it says "[Event Procedure]".
Alkan Toykan  @Reply  
      
16 hours ago
It seems from your post that the procedure was originally written as From_Load and later renamed to Form_Load. Access only executes a procedure if the corresponding property on the Event tab displays Event Procedure. Manually editing the procedure name does not establish this connection. Because of this, Debug & Compile passes without errors, but the code never runs. This is precisely the point Donald pointed out. You should check this first.

When Form_Load goes to a new record Form_Current is triggered. On a new uncommitted record Recordset.AbsolutePosition may not return a valid position and can cause an error. RecordCount can also be inaccurate in a dynaset if all records have not been loaded yet. Form Current can be written in a more reliable way like

Private Sub Form_Current()
If Me.NewRecord Then
RecCountBox = "New Record"
Else
RecCountBox = Me.CurrentRecord & " of " & Me.RecordsetClone.RecordCount
End If
End Sub

Form settings might be blocking new records. If Allow Additions = No then acNewRec fails silently. And if the form record source is an uneditable query like some JOIN or Group By queries new records cannot be added.
Add a Reply Upload an Image
Next Unseen

 
 
What's This?

 

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: 9/28/2026 6:16:40 PM. PLT: 0s