Continuous Subform

S

Sandy

Hi
I have a continuous subform on a main form that displays a
date field. This date field is for users to record the
date an approval was made. Some records may require only
one approval while others require several approvals.

I have place an image of an down arrow underneath the date
field to show the user the flow of the approvals. I am
trying to find a way to hide the arrow for the last record.

The number of records in the subform are set when the main
form opens so no new records are ever added to the subform.

Any clues?

Thanks in advance
Sandy
 
G

Guest

This is easily accomplished if you are using a recordset
clone.

In your On Current event type

dim db As dao.database
dim recClone As recordset

set db=currentdb()
set recClone=Me.recordsetclone

recClone.MoveLast

If Me.UniqueField = recClone!UniqueField Then
Me.Arrow.Visible=False
Else
Me.Arrow.Visible=True
End If

recClone.Close
db.Close

That has worked for me in the past. However, one
challenge you might have with this being in a Continuous
Form is the initial visibility of the down arrow. What
you might consider doing is using the above code along
with the added advantage of setting OnOpen (or the
properties for the Arrow) and the LostFocus Events

Me.Arrow.Visible=False

That way the arrow is defaulted to off, and only visible
if the record is not the last record. I think this may
be a case where the reversal of the logic is more
effective, turning it on when you want it on, instead of
turning it off when you don't want it. Continuous Forms
are often tricky that way.
 

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