go to action

G

Guest

I'm setting and "on enter" macro that runs the gotorecord action on a form.
I want to set the record number (offset, on the macro window) to be equal to
the record number of the form from where I'm sending the recuest.
The macro window looks like this:

GotoRecord
ObjectType: Form
ObjectName: frmMyProjects
Record: Go To
OffSet: THIS IS THE STRING THAT I NEED, IT NEEDS TO INDICATE "GOTO THE
RECORD ON THE "frmMyProjects" THAT HAS THE SAME RECORD NUMBER AS ME"

Thanks.
 
D

Dirk Goldgar

IT-1957 said:
I'm setting and "on enter" macro that runs the gotorecord action on a
form. I want to set the record number (offset, on the macro window)
to be equal to the record number of the form from where I'm sending
the recuest.
The macro window looks like this:

GotoRecord
ObjectType: Form
ObjectName: frmMyProjects
Record: Go To
OffSet: THIS IS THE STRING THAT I NEED, IT NEEDS TO INDICATE "GOTO THE
RECORD ON THE "frmMyProjects" THAT HAS THE SAME RECORD NUMBER AS ME"

Thanks.

As far as the macro is concerned, there is no "Me", but you can use
Screen.ActiveForm to refer to the form that currently has the focus. So
try this:

Offset: =[Screen].[ActiveForm].[CurrentRecord]

Note the leading "=" sign. You need that, to let the macro know this is
an expression to be evaluated.
 

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


Top