Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change detail height is not completely clear for me

Status
Not open for further replies.
Mar 27, 2002
168
NL
I'll try to change my detailheight based on a field (vervallen). It's a boolean, if true then detailheight = 800 else detailheight = 430.
What happened? The detailheigth 'walked' one record to late and reset each new page to 430.
So it doesn't represent what I want in the right way.

Hope someone can help me..

Private Sub Details_Format(Cancel As Integer, FormatCount As Integer)

If Nz(Me.vervallen, 0) = -1 Then
Me.projectnaam1 = CutTextOff(Nz(Me.projectnaam, ""), 44)
Me.offerteomschrijving1 = CutTextOff(Nz(Me.offerteomschrijving, ""), 38)
Me.bedrijfsnaam1 = CutTextOff(Nz(Me.bedrijfsnaam, ""), 39)
Me.projectnaam1.FontBold = True
Me.bedrijfsnaam1.FontBold = True
Me.offerteomschrijving1.FontBold = True
Me.werknummer.FontBold = True
Me.gevolgd_door.FontBold = True
Me.lblMarker.Visible = True
Me.Details.Height = 800
Else
Me.projectnaam1.FontBold = False
Me.bedrijfsnaam1.FontBold = False
Me.offerteomschrijving1.FontBold = False
Me.werknummer.FontBold = False
Me.gevolgd_door.FontBold = False
Me.projectnaam1 = CutTextOff(Nz(Me.projectnaam, ""), 47)
Me.offerteomschrijving1 = CutTextOff(Nz(Me.offerteomschrijving, ""), 42)
Me.bedrijfsnaam1 = CutTextOff(Nz(Me.bedrijfsnaam, ""), 43)
Me.lblMarker.Visible = False
Me.Details.Height = 440
End If
End Sub
 
I thing it is the if statement doesn't logically work the way you want, try changing the if statement to just test Me.vervalen is false

If Me.vervallen = False Then

Let me know if this does anything!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top