Access 2002 macro - Using GoToControl

G

Guest

I have a macro which puts up a message box when a particular control of a
form is completed, reminding the user to complete another associated control
in a subform of the same form. I then want to place the cursor in this
control. I have managed to get the focus to move to the subform using
GoToControl. I want to use another GoToControl to take the focus to the
control in question but I can't make it work. The control is called "End
date". I put this name (in square brackets) in the GoToControl parameter box
but it doesn't work. Grateful for any suggestions.
 
G

Guest

Thanks Steve. Tried that and got this message:

There is no field named 'Career details subform!End date' in the current
record

Cheers B N-M

Steve Schapel said:
Billy,

Try like this...
[NameOfYourSubform]![End date]

--
Steve Schapel, Microsoft Access MVP
I have a macro which puts up a message box when a particular control of a
form is completed, reminding the user to complete another associated control
in a subform of the same form. I then want to place the cursor in this
control. I have managed to get the focus to move to the subform using
GoToControl. I want to use another GoToControl to take the focus to the
control in question but I can't make it work. The control is called "End
date". I put this name (in square brackets) in the GoToControl parameter box
but it doesn't work. Grateful for any suggestions.
 
G

Guest

I've sorted it now. I had not used the correct name for the field - I used
the name of the data source instead.

By the way, it didn't want [Subform name]![Control name] - just [Control
name].

Thanks for your help

B N-M

Steve Schapel said:
Billy,

Try like this...
[NameOfYourSubform]![End date]

--
Steve Schapel, Microsoft Access MVP
I have a macro which puts up a message box when a particular control of a
form is completed, reminding the user to complete another associated control
in a subform of the same form. I then want to place the cursor in this
control. I have managed to get the focus to move to the subform using
GoToControl. I want to use another GoToControl to take the focus to the
control in question but I can't make it work. The control is called "End
date". I put this name (in square brackets) in the GoToControl parameter box
but it doesn't work. Grateful for any suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

GoToControl troubles 2
GoToControl problems in a macro 3
GoControl Problem 3
GotoControl and Subforms 9
GOTOCONTROL 3
SetProperty Action in Macro 6
GoToControl macro action 8
Macro 1

Top