Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Account Balances 6    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
OpenFormBelow new record
Tannim Hallman 
     
2 years ago
I'm using the OpenFormRight and OpenFormBelow in my main DB. They work like charms, and are very handy. I've got my AppointmestListF set to open to the right of MainMenuF and ContactF opens below that and matches width. Both happen in OnLoad events. I'd like ContactF to open to a new record. I can make it load with a client's data by opening ClientF as hidden in the MainMenuF OnLoad, and I know how to do it with DoCmd.OpenForm but it doesn't seem to be an option in OpenFormBelow. Does it somehow fit in the where condition?
Alex Hedley  @Reply  
           
2 years ago
Tannim Hallman OP  @Reply  
     
2 years ago
I tried that, and it's not opening to a new record.

Private Sub Form_Load()

   OpenFormBelow "ContactF", "AppointmentListF", True
   DoCmd.GoToRecord acDataForm, "AppointmentListF", acNewRec
    
End Sub
Richard Rost  @Reply  
          
2 years ago
What's it doing? Let's see a screenshot.
Tannim Hallman OP  @Reply  
     
2 years ago

Tannim Hallman OP  @Reply  
     
2 years ago
As you can see, it's pulling all contacts for all clients, which it's doing because I've not got it filtered with dlookup, which is fine because I just want her to enter new contacts here and look up all contacts through the client form or clicking the contact form button in the main menu.
Kevin Robertson  @Reply  
           
2 years ago
One of the optional parameters is WhereCond. Set the ID to 0 and you will be on a new record.

   "ContactID=0"
Kevin Robertson  @Reply  
           
2 years ago
Another way would be to add an additional optional parameter (I added it after WhereCond).
    Optional DataMode As AcOpenDataMode = acFormPropertySettings

Then add DataMode to the Docmd.OpenForm in the Public Sub in the Module.
    DoCmd.OpenForm FormToOpen, , , WhereCond, DataMode

Then use acAdd in the code that calls the sub, for example:
    OpenFormRight "CustomerF", "MainMenuF", , , acAdd
Tannim Hallman OP  @Reply  
     
2 years ago
Brilliant! Thank you!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Account Balances 6.
 

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: 4/15/2026 7:01:36 PM. PLT: 1s