By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,921 Members | 1,493 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,921 IT Pros & Developers. It's quick & easy.

'Me.' macros in Access...HELP!

P: 1
Ok - so this is my first go-around w/ macros - I have a form where there is a field "Contact Type" now when this field gets updated, I want Access to automatically put a date in my "StatusUpdateDate" field. Though a little research I found that I could put in the Me.StatusUpdateDate=Date in the "Contact Type" After Update property, but this gives me an error of Microsoft Cannot Find the macro 'Me.' --- do I have to create one? If so how?

I didn't initially want to use macros but if I can get this 'Me.' thing figured out I could definitely use it in other areas here and save myself a lot of manual time updating....thank you in advance!
Nov 10 '08 #1
Share this Question
Share on Google+
1 Reply


Expert Mod 2.5K+
P: 2,545
Hi. If you are really using an Access Macro (and not VBA code in the After Update event of the control) you are mixing different things. The Me syntax is VBA shorthand for the current form (or report if the code segment related to a report and not a form). You can't use the Me.{property} syntax in an Access macro, but you can in VBA.

Me in a code module on a form is shorthand for
Forms("your current form name")
(as one among many ways to refer to individual forms in the forms collection)

I suggest that your simplest solution is to right-click on the After Update event property of the control concerned and select build, code to open the VBA editor with a skeleton After Update subroutine ready to populate, then fill in the part you have mistakenly placed in the macro in the VBA code instead.

There are many similar examples on this site.

-Stewart
Nov 10 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.