Solved

Setfocus using Navigation form

Posted on 2011-09-03
4
825 Views
Last Modified: 2013-11-28
I developed a group of forms that I then moved into a Navigation Form. When testing this code from just the original form (not in the Navigation form) it worked fine:

Private Sub StopField_Enter()
Forms!BarQCProdForms!InspectorName.SetFocus
End Sub

The Form name is BarQCProdForms and the field I set the focus to is InspectorName

My Navigation form name is E1E2Forms and now the BarQCProdForms is within that.

When I test while in the Navigation form I get the error message :

Run-time error ‘2465”:
Microsoft Access can’t find the field ‘InspectorName’ referred to in your expression.

I tried several things including changing BarQCProdForms to E1E2Forms within the Forms! Statement.

Thanks for any help you can provide.
0
Comment
Question by:devander
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:c1nmo
ID: 36478320
[BarQCProdForms].Form![InspectorName].Setfocus
0
 

Accepted Solution

by:
devander earned 0 total points
ID: 36478375
Thanks for the suggestion, but it did not work either for my particular case. But! I did find a much simple solution that I kick myself for not thinking to use before"

Me.InspectorName.SetFocus

duh!
0
 

Author Closing Comment

by:devander
ID: 36501235
Sometimes, just asking the question forces us to rethink the problem...
0
 
LVL 6

Expert Comment

by:c1nmo
ID: 36478399
I see, I read it as being set from the parent form, not within the subform.  Looking for a problem when there wasn't one lol
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question