SetFocus

Haytham

Registered User.
Local time
Today, 00:31
Joined
Jun 27, 2001
Messages
162
Hi All...
I always use the command
DoCmd.GoToControl "FieldName" but now it's not working and giving a message that the field name is not available.
Alternatively, I used
FieldName.SetFocus
Any Idea Please
 
You may have a corruption problem, have you compilled and saved all modules, failing that try importing everything into a new blank db, assuming your still working with the same version of access FieldName.Set Focus is correct.
 
Hi again,
Well, I compile all modules and no problem in there.
FieldName.SetFocus work well.
But why DoCmd.GoToControl "FieldName" is not working anymore is my problem.
I created previous dbs with such command with no harm.
Now I'm using A2K. Will that make any difference
 
Any chance that the field you are moving to is "Disabled". Or that you may actually be trying to refer to a label rather than a field?
 
No sir it's neither disabled nor a label.
It was working very well in Access97 but not now in A2K.
Maybe any missings in the library
Any idea please with many thanks
 
I recall that you recently referenced the DAO library.

Try

DoCmd.FieldName.SetFocus
 
Hi jwindon,
Really I don't understand what's DAO and what it will do with the library and the reference. I have simply installed A2K and then all my code did not work.
How can I get rid of it all Or do I have to change all of my codes according to the DAO..
Sorry if this question is silly
 
Yes, there are differences in Code for Access 2000.

Microsoft's Support site has a great deal of information regarding these changes. Perhaps you could post your findings here for other viewers to learn from.
 
Very Thankful jwindon, I think I have to read and learn more, and sure I'll be back to you again
Again thank you.
 

Users who are viewing this thread

Back
Top Bottom