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 
DoCmd OpenForm
Walter Hamilton 
    
4 years ago
I'm having an use running: DoCmd.OpenForm.  my syntax is as follows:

DoCmd.OpenForm [frm_NDA], , , "[NDA_ID]=" & [NDA_ID]

I keep getting the following VIsual Basic Error:

Run-time error '2465':

OWT Management 4 v.2 can't find the field '1|' referred to in your expression.

Both forms have NDA_ID as a hidden field in the form.  I can't seem to get the syntax correct.  I've looked back at other forms where I use this command and I think I'm constructing it the same way.
Kevin Robertson  @Reply  
          
4 years ago
Your form name needs to be in double quotes.

DoCmd.OpenForm "[frm_NDA]", , , "[NDA_ID]=" & [NDA_ID]
Adam Schwanz  @Reply  
           
4 years ago
What about DoCmd.OpenForm "frm_NDA"
Adam Schwanz  @Reply  
           
4 years ago
Sat on this question too long before pushing submit, what Kevin said haha
Kevin Robertson  @Reply  
          
4 years ago
LOL Adam
Walter Hamilton OP  @Reply  
    
4 years ago
I updated it to reflect the following:

DoCmd.OpenForm "[frm_NDA]", , , "[NDA_ID]=" & [NDA_ID]

I'm now getting this error message

Run-time error '2102'

The form name '[frm_NDA]' is misspelled or refers to a form that doesn't exist.

I'll attahed a screenshot showing that frm_NDA exists.

Walter Hamilton OP  @Reply  
    
4 years ago

Walter Hamilton OP  @Reply  
    
4 years ago
Kevin - I also tried to opening frm_NDA and I get the Run-time error 2102 message with it as well.

It's weird because the form exists.
Walter Hamilton OP  @Reply  
    
4 years ago
OK.  I got it to work.  Adam was the key.  The following command works:

DoCmd.OpenForm "frm_NDA", , , "NDA_ID=" & NDA_ID

Thanks for your assistance.

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 6:29:20 PM. PLT: 1s