SetFocus giving me an error

A

Asha

I am trying to set the focus of my field after an insert
is made to the control I want to be when the navigation
bar is clicked to next record. I wrote previously and
someone told me to do the following

Select Form -> Properties->Events->Oncurrent->type in
[IngrdCode].SetFocus When I do this I get the following
error:

Microsoft Access can't find the macro SetFocus in the
macro group IngrdCode
You used the macrogroupname.macroname syntax to speicfy a
macro. You then tried to run the macro (directly or
indirectly), or you used the Runmacro method to run the
macro. However, the macro you specified is not in the
macro group. Create the macro in the macro group,
specificy the correct macrogroup, or specify the correct
macro name.
End of Error message:

I don't know how to do anything it is tell me to do.
Please help.
 
A

Asha

This worked great! Thank you.
-----Original Message-----
Hi,
You have to type that code in the event procedure.
Click on the elipsis (...) beside the event on the property sheet.
This will open up the VBA editor. Then type that code in.
IngrdCode.SetFocus
I assume that IngrdCode is the name of the control.

--
HTH
Dan Artuso, Access MVP


I am trying to set the focus of my field after an insert
is made to the control I want to be when the navigation
bar is clicked to next record. I wrote previously and
someone told me to do the following

Select Form -> Properties->Events->Oncurrent->type in
[IngrdCode].SetFocus When I do this I get the following
error:

Microsoft Access can't find the macro SetFocus in the
macro group IngrdCode
You used the macrogroupname.macroname syntax to speicfy a
macro. You then tried to run the macro (directly or
indirectly), or you used the Runmacro method to run the
macro. However, the macro you specified is not in the
macro group. Create the macro in the macro group,
specificy the correct macrogroup, or specify the correct
macro name.
End of Error message:

I don't know how to do anything it is tell me to do.
Please help.


.
 

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

Top