473,414 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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

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
1 4282
Stewart Ross
2,545 Expert Mod 2GB
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

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

Similar topics

37
by: michele.simionato | last post by:
Paul Rubin wrote: > How about macros? Some pretty horrible things have been done in C > programs with the C preprocessor. But there's a movememnt afloat to > add hygienic macros to Python. Got any...
12
by: David Powell | last post by:
Because my work area won't have an Access programmer next year, I've been asked to rebuild their coded application as a set of modular tools. The idea is that a non-programmer will be able to...
3
by: Peter Stalder | last post by:
I want to alter a menu bar based on user's actions. My menu bar is established using macros. Is there any way to edit the menu bar macro using Visual Basic, so that the menu name will change. I...
3
by: Momoko | last post by:
Hi, I have three Access Databases, say A, B and Main, in which data flows between Main and A, Main and B. Within A and B, there are macros that trigger computation within the databases. I need...
6
by: Reg | last post by:
At present I'm running a number of macros with a schedular on my computer to update and maintain databases within our network. All my backends contain the tables that the macros update. But all the...
2
by: Josh E | last post by:
Is it possible to write custom macros in Access, or are you only able to use the ones they allow? If so, how do you go about accessing the Editor. One more question, what is a good source to...
3
by: dan_roman | last post by:
Hi, I developed a script with a nice interface in Tkinter that allows me to edit some formulas and to generate an Excel worksheet with VBA macros within it. The script runs perfectlly in Office...
4
by: Suzette | last post by:
I have an excel file that automatically updates when opened, pulling information from an Access database into into various pivot tables. I created a macro in Access to perform various necessary...
5
by: Salad | last post by:
If I click on the Macros button in the database window there is 1 macro that exists...AutoExec. If I click on the Modules button and enter the VB Editor window there's the menu option Tools. ...
20
by: timmg | last post by:
You know, I've had so much fun reading the thread on lookup field's subservience to the Dark One that I thought I'd provoke another, ah, polite discussion on the topic of Macros. I've always...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.