Accumulate Data

Posted on 2006-04-18
Medium Priority
Last Modified: 2012-08-13
A Combo box allows changes in the status recorded for each record in a table (A).

I would like to accumulate a historical record of what's been changed, and when. So I want to set up a new table(B), containing 3 fields: an index(to link back to the main table A), the new status, and the date/time when it happened.

What would be the best trigger for an event associated with the Combo box? And what code will enable me to create a new record each time for the table B?


Question by:VaughanM
  • 2
LVL 54

Expert Comment

ID: 16477213
Best to use the BeforeUpdate event of the form.
There you can use:

currentdb.execute ("insert into tblLog (DateTimeUpdate, oldvalue, newvalue) values (Now(),'" & me.status.oldvalue & "','" & me.status & "'")

Getting the idea ?


Author Comment

ID: 16484923
Hi Nic,

Best to use the BeforeUpdate event of the form. - OK, got that.

The  currentdb.execute is foreign territory to me - where can I find a good introduction to it? I'm OK with VBA, but I don't know the currentdb word.


LVL 54

Accepted Solution

nico5038 earned 375 total points
ID: 16485096
The "CurrentDb" is referring to the current database and saves the "trouble" in defining a Workspace and a Database before executing the acyion query.
Just select the word and press F1 to get the context sensitive Help about the use of the CurrentDb.


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question