setfocus

  • Thread starter Thread starter Wilson
  • Start date Start date
W

Wilson

Using A97:
Main form: Paint
Sub form: Paint subform


Feild on Main form: System 1
Needs to have After Update go to subform so that the user
can enter more data
Tried:
Me![paint subform].setfocus (error = can not find
field, "paint subform")
Me![description].form![paint subform].setfocus (error =
can not find field "description")
Me![paint subform].form.[description].setfocus (error =
can not find field "paint subform")
Me![description].form.[paint subform].setfocus (error =
can not find field "description")

Since the user has a choice of system 1, 2 or 3 I was
planning to enter the code at the after update for each.
I was attempting to stay away from tab set to "make it
easier for the end user"

Thank you in advance for any and all help!

Wilson
 
Wilson said:
Using A97:
Main form: Paint
Sub form: Paint subform


Feild on Main form: System 1
Needs to have After Update go to subform so that the user
can enter more data
Tried:
Me![paint subform].setfocus (error = can not find
field, "paint subform")
Me![description].form![paint subform].setfocus (error =
can not find field "description")
Me![paint subform].form.[description].setfocus (error =
can not find field "paint subform")
Me![description].form.[paint subform].setfocus (error =
can not find field "description")

Wilson,

try this:

Me![Paint subform].Form.SetFocus

where I assumed, 'Paint subform' is the name of the subform
_control_, not of the form as such.

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 
Wilson,

Although the form which you have used as the subform may be named
"Paint subform", it sounds like this is not the name of the subform
*control* on the main form which is what you are referencing.
Solution is to either name the subform control as "Paint subform", or
else change the code to...
Me![NameOfSubformControlOnPaintForm].SetFocus

- Steve Schapel, Microsoft Access MVP
 
Back
Top