width of a f eld

G

Guest

I have a report that hase several fields that are printed across the page,
sometimes the fields are blank,

A second field is printed below these and is as wide as the page,
is it possible to adjust the width of this particular field using VB,
depending on which of the fields above it is teh last visible field

ie

field1 field2 field3 field4
fieldab

if field4 is null, then i want the width of field "fieldab" to be as wide as
3 * the width of field1, (fields1 to field4 all have the same width)
 
G

Guest

On the on format event of the section where the fields are, you can write the
code
If IsNull(Me.field4) Then
Me.fieldab.Width = Me.field1.Width * 2
Else
Me.fieldab.Width = Me.field1.Width * 3
End If
 

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