"Larry R Harrison Jr" (larrytucaz@mindspring.com) wrote in message news:9b0bvi$om1$1@nntp9.atl.mindspring.net...
I have a macro derived straight from Microsoft's Knowledge Base which updates the "date_modified" and "time_modified" values on a form whenever a record is added or updated. The macro is assigned to the "before update" procedure of the form.
This works perfectly on my computer but for some reason this same exact database's macro fails whenever the database is run from another machine. I tried writing Visual Basic equivalents to this, and the exact same thing resulted--works fine on my machine, totally crashes the database on the other machine.
Does anyone have any idea why in the world this would be happening? Thanks SO MUCH, Larry
"Larry R Harrison Jr" larrytucaz@mindspring.com wrote in message news:9b0qer$hmo$1@slb7.atl.mindspring.net... I am sorry if I wasn't clear. The error message? If it's a macro, it simply stops running with the "halt" message popping up. If it's Visual Basic code, the error message is a "compile" error, "library not found," I believe.
"Library not found" certainly suggests a references problem.
From any code module, click Tools - References. Look for a reference marked MISSING, and remove the checkbox next to it. Click OK to leave the dialog box, and try your macro again.
HTH - Turtle
"Douglas J. Steele" (djsteele@canada.com) wrote in message news:el6MWHtwAHA.1908@tkmsftngp05...
You need to have a code module open to get to the References option. If you don't have any code modules in your application, either add one (you don't have to save it when you're done), or open the Debug window (using Ctrl-G), provided you haven't chosen the "keep debug window on top" option.
Doug Steele, Microsoft Access MVP
Beer, Wine and Database Programming. What could be better?
Visit "Doug Steele's Beer and Programming Emporium" http://I.Am/DougSteele/
From Brendan Reynolds brenreyn@indigo.ie
Sorry, Larry, did we forget to tell you? It's 'ignore Larry week' this week! :-)
It's probably a missing reference. Open any module (or hold down the Ctrl key and press G to open the Immediate window) and select References from the Tools menu. Look for any marked 'Missing'. In your other post you mention that you're using Access 97. One common cause of reference problems in Access 97 is where you move the MDB from a machine which has the service releases installed to one that doesn't (or the other way around). Access 97 originally shipped with DAO 3.50, while the later service releases introduced DAO 3.51. You may need to change the reference on the problem machine to point to the version of DAO that is installed on that machine. (Or, if possible, ensure the service packs are installed on all machines).
-- Brendan Reynolds brenreyn@indigo.ie