Macros run inconsistently: run in old records or copies of old rec

G

Guest

I'm working on a medication monitoring system for my clinic using Access
2003. One of the essential tasks of the system is to calculate a suggested
dosage range for the medication in response to a lab value. The lab value,
current dosage, suggested range, and follow-up dates are managed in a subform
(1 patient to many lab/rx records.)

I have two separate macros involved in this process. One calculates the
suggested lower end of the dosage range. The other calculates the suggested
high end of the dosage range.

I suspect that my design of these macros is less than elegant (duct tape and
spackle, actually!) They are set up as a series of conditional expressions.
The macros worked on the db as it was set up. I was out of the office for a
week. Although everyone swears they did not touch the db, the macros did not
run when I returned to the office. I have run them stepwise and see no
problems.

Here's the odd part. The macros still run on "old" patient records (entered
before ~1/20/05.) They don't run on "new" records. If I copy an "old" patient
record, paste it in using Table view, and change the chart number (primary
key, so it has to be changed), the macros DO run. If I enter a "new" patient
record via either form or table, the macros do NOT run.

There is one other macro in the subform - a warning box if the prescribed
dosage and the actually-taken dosage do not match. That runs in "old" or
"new" records with no problems. I've tried using RunMacro with each and both
of the dosage range mcrs *inside* the discrepancy warning macro and that has
not worked.

I have tried removing the macros / event procedures and adding them back in
one by one, individually and in combination, with no luck.

Help! I realize I'm way in over my head here, but it is so frustrating to
get this far and then take three giant steps back. At this point I have about
25 hours of my life invested in this project (plus another 5 hours today.) So
I am determined to sort this out one way or another.

Any ideas?
Thanks,

Heather
 
M

MacDermott

Do you actually mean Access macros, or is this coded in VBA?

Troubleshooting is usually much easier in VBA, and Access even provides the
option of saving macros as VBA. That would be the first step I would
suggest as you look into this.

What do you mean when you say the macros "do not run"?
What prompts them to run?

Usually, I would ask you to post the problem code, but it sounds as if there
would be more than most (volunteer) respondents here would want to wade
through.
Perhaps you could just post the part that launches the macros?

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top