×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Using data macro to alert user when record is added to a table.

Using data macro to alert user when record is added to a table.

Using data macro to alert user when record is added to a table.

(OP)
Hello,

I have a problem whereby a record is added to my table tbl_Garage when it should not be.

I cannot trace why this is happening so thought I would add a data macro to tbl_Garage which triggers after a record is added. This would at least pin-point the moment a record is added, so I may be able to work out what’s causing this.

I cannot see how to make access display a message box from the data macro - could someone help, or suggest another approach?

Many thanks Mark

RE: Using data macro to alert user when record is added to a table.

Use RaiseError action. An example here.

combo

RE: Using data macro to alert user when record is added to a table.

Is yours the only application that can add a record to that table?
If yes, you can easily add some kind of tracing wherever you have INSERT INTO tbl_Garage ... statement, or whatever you do to add a record to your table. That would also allow you to track who and from where in your code the new record has been added.
You can also add a new field to that tables (DateAdded) defined as DateTime and set its default value to Now()

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close