That's where the code should be, so there's something else going on that's
causing the problem with Me.
One thing you might check is whether you have a problem with the References
collection.
While you're in the VB Editor, select Tools | References from the menu bar.
Examine all of the selected references.
If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.
If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
JudyT said:
Douglas,
I am new to access....now with that said, I made a form from a query,
which
comes from a table. The VB code that I used was from the form, then the
event procedure, then i copy and pasted the vb code here. So I am not
sure
what you are talking about, would you mind explaning further? Thank you
JudyT
:
Where is the code that's running: in a stand-alone module, or in a module
associated with a form (which is actually a class)?
"Me." is a keyword that identifies the specific instance of the class
where
the code is executing. In this particular context, the expectation is
that
it's in the module associated with a form, and that FirstField and
SecondField are controls on that form.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Susan Sorry, the statement is this...can't find the macro 'Me.'
:
Hi Judy,
In the first field's after update event:
Me.SecondField = DateAdd("m", 30, Me.FirstField)
--
hth,
SusanV
I have two date fields, and as the first one is filled in, i want
the
second
to add 30 month calculation and post it to the second field. This
is
what
I
have thus far:
Private Sub Active_Initial_106_2_Qual_Enter()
DoCmd (DateAdd("m", 30)([Main Roster Database].[Form_Main
Roster]![Current_106_))
End Sub
Thanks for your help in advance.