Detail Format Not Firing

J

jelybeans

I'm using Access 2007 on a Vista machine. I have a report that I'm trying to
format using VB code. I have placed code in the Detail_Format Sub but it's
not automatically firing. I also tried placing the code in the Report_Current
Sub but that dosent seem to fire when the recordset changes records.

I have another database where I use the Detail_Format Sub and it fires
automatically. That DB is in 03 format .mdb - I tried changing the DB I'm
having problems with to the 03 .mdb format but still no luck.

I'm wondering if it is a setting I have wrong? The weird thing is I run the
other DB using tha same machine and the Detail Sub fires.

Any help would be appreciated.
 
T

Tom van Stiphout

On Thu, 23 Jul 2009 10:30:01 -0700, jelybeans

Sometimes an event procedure becomes "disconnected" from its event.
Design the report, select the Details section, in the Properties
window select the ... button next to the event. This will re-associate
the link.

-Tom.
Microsoft Access MVP
 
J

jelybeans

Thanks for the reply. That is the first thing I checked, and it still has
"[Event Procedure]" next to the On Format in the property sheet. I even tired
deleting it and redoing it but I still can't get either on to fire.
 
J

jelybeans

I do have some conditional code that may be skipped so I tested using a
msgbox statement. I hadn't previously tested using a breakpoint however I
just tried that and it didn't work. I also tried your other suggestion - I
took out the event procedure and saved it then re-named it, opened it, reset
the event procedures and still nothing.

The weird thing is that other events fire automatically like Detail_Paint
and Report Open.
--
Piper


JimBurke via AccessMonster.com said:
This might sound like a stupid question, but are you verifying that the event
is not being fired by setting a breakpoint in it at the very first statement?
Do you have conditional statements in it that
cause the code to be skipped in certain situations?

If it's still not working, just for kicks I would try this - should only take
a couple of minutes:

- Go into the report in design mode and delete the On Format event proc

- Create a new copy using Save As. This way the original copy will still be
as it was. Re-create the On Format event in the new version.

- Rename the original report temporarily, rename the new version to the
'production' name of the original. Now try running it and see what happens.

Thanks for the reply. That is the first thing I checked, and it still has
"[Event Procedure]" next to the On Format in the property sheet. I even tired
deleting it and redoing it but I still can't get either on to fire.
Sometimes an event procedure becomes "disconnected" from its event.
Design the report, select the Details section, in the Properties
[quoted text clipped - 17 lines]
Any help would be appreciated.
 

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

Top