Handling Data on EACH RECORD in Form Display

A

Alex Maghen

If I create a Form in Access and I have several text fields and other
directly bound controls in the detail section of the form but I ALSO have
some other things (like, let's say, an image box or something in which I have
to run some code for each record to determine how to set its properties. I
can't figure out if there's an EVENT that's fired for each record that is
DISPLAYED when the forms is shown (regardless of user interaction).

Alex
 
A

Alex Maghen

Hi. Well I've tried this and Current seems to only occur once when I load the
report. I found something called the Detail_Format() event which seems JUST
right, but strangely, I can't get it to fire at ALL. Any ideas? What am I
doin' wrong?

Alex
 
A

Alex Maghen

WOW! Well then is there ANYTHING I can do in Access to receive an event?
Obviously the individual bound controls are getting some kind of event or
property setting. Can't I?

Thanks for any help you can give!

Alex
 
A

Allen Browne

The Detail_Format event applies to reports.
From the subject line, we are talking about forms here?

In a form, the Current event fires each time a record becomes current. That
happens when you first open the form, but it also happens when you navigate
between records. You should see this behavior if you add the line:
Debug.Print "Form_Current at " & Now()
to the event, open the Immediate window, and then navigate records in the
form.

If you are using a continuous form, *one* record is the currently active
one. Any values you read in Form_Current will be read from that record. You
will not be able to use Form_Current to load different images into different
rows of a continuous form.
 
E

Exponent

Not that I'm aware.

You can populate a fixed layout of controls in code, displaying a page of records at a time, but if you
have many info controls this will likely be complex to implement and difficult to maintain. An example
(based on our own image control, but which should work with others) can be seen here:
http://www.ammara.com/support/samples/showsam084d.html

--
_______________________________________________________
http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info
DBPix 2.0 - lossless jpeg rotation, EXIF, asynchronous
 
R

Rick Brandt

Are you saying the Current event doesn't fire in a continuous form? It
certainly does.
 
E

Exponent

Not for each record (the loud part of subject of this thread) - do you see something different ?
 

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