Variable field in macro

G

Guest

I am trying to create a macro or VB code which refers to the current field
which is selected. Because I am trying to create a macro which will be able
to be used for different fields. So if I have Field1 and Field2 and I am
trying to SetValue after the field has been updated. So to put it simply as
just an example, I want to make it so that afterupdate Field1 will be changed
to 1, then using the same macro I want to have afterupdate Field2 value
changed to 1. So that I don’t have to keep reworking the same macro for
different fields (not that I am accutally trying to set the value of the
field to 1).
Thank-you for your time.
 
G

Guest

Thank-you for your help

Steve Schapel said:
Menscandidus,

Try using...
[Screen].[ActiveControl]

--
Steve Schapel, Microsoft Access MVP

I am trying to create a macro or VB code which refers to the current field
which is selected. Because I am trying to create a macro which will be able
to be used for different fields. So if I have Field1 and Field2 and I am
trying to SetValue after the field has been updated. So to put it simply as
just an example, I want to make it so that afterupdate Field1 will be changed
to 1, then using the same macro I want to have afterupdate Field2 value
changed to 1. So that I don’t have to keep reworking the same macro for
different fields (not that I am accutally trying to set the value of the
field to 1).
Thank-you for your time.
 

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