Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Forums > Access
Back to Access Forum    Comments List
Runtime error 2450 Upload Images   Link   Email  
Colby Wolford 
I'm dealing with 3 forms in this scenario:
   1. Main Form: Applications
   2. Subform: ApplicationDetails
   3. Info Form: ApplicantInfo

While coding a Map button on the subform (ApplicationDetails) to open a map showing the route and other info between an Applicant's home address (ApplicantInfo) and the work address (ApplicationDetails), I get a 2450 run-time error stating that Accesss can't find the ApplicantInfo form, but as you can see from the screengrab, it exists and it's spelled correctly.

CODE
###############
Private Sub btnMap_Click()

Dim varHome As String
    varHome = Forms!ApplicantInfo!Address1 & ",+" & Forms!ApplicantInfo!ResidenceCity & ",+" & Forms!ApplicantInfo!ResidenceState & ",+USA/"

Dim varWork As String
    varWork = Me.JobLocationCity & ",+" & Me.StateID

Dim varDest As String
    varDest = varHome & varWork

Application.FollowHyperlink "https://www.google.com/maps/dir/" & varDestination

End Sub
###############

I've tried renaming the form thinking that perhaps Access didn't like the name for whatever reason and corrected the code to the new name. But I'm still receiving the error. I'm assuming my code is incorrect, but I don't understand what's causing the error and why.
Colby Wolford 

Kevin Robertson 
You need to open ApplicantInfo first BEFORE you can reference it.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

 
 
 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/28/2024 7:16:03 AM. PLT: 0s