Solved

Setfocus using Navigation form

Posted on 2011-09-03
4
818 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
  • 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
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…

770 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