Syndicate content

Errors and Form_Open() in MS-Access Main

Problem

I wrote some MS-Access code that I want to execute once a day.

I created a table to save the time stamp of the last update. Each time the application starts, I check that variable. If it's 1 or more days off, then I run my update. To make it always work on a day boundary, I had to convert the returned value of Date() in a year, month, day value. I used DatePart() with the "yyyy", "m" and "d" formats. I guess I could have used the Unix date and divide that by 86400 too.

The update copies some data from one database to another. Very simple, although I made a couple of mistakes...

But the main problem here is errors. If there is an error in that function, it is not reported at all. I had a couple small problems and it just did not seem to do anything. I could not add a break point nor look at the log (what log?!)

Solution

My solution was to have a copy of that code in another form where it would run in the usual environment. That way I could add a break point and debug the function.

This worked great, also it was a bit annoying, it served the purpose well.

I guess another way would be to copy the content of the Form_Init() function in a public function and call that function from both places.

Syndicate content

Diverse Realty

Diverse Realty Team

Want a New Home?
Want to Sell Your House?

Call Alex at
+1 (916)
220 6482

Alexis Wilke, Realtor
Salesperson
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • boost
  • diaeresis
  • dump

    The dump command, under a Unix system, is used to dump the entire file system to another device. By default, the dump output device is a tape device (/dev/tape). Now a day, however, it is often used with other devices such as another file system (from one hard drive to another.)

    Other systems use that same keyword. It is particularly the case of database systems. For instance, the PostgreSQL database has a pg_dump command.

    The opposite command is restore. That command is used to get the data from the output device and put it back on your hard drive.

  • ensure
  • keypad