Good afternoon all,
I have a report which has a memo field and 3 associated textboxes below the memo. I have set up the report to have the option to show the txtbox or not 'on Open'. When the text boxes are not visible, I want them to take no space at all such that more memo fields can be displayed per page. To that end, I have toyed with code that just don't work:
I first tried the size attribute, that didn't work. I now tried height, and it doesn't work either. I am sure that something works, just don't know what it is.
Thank you for the help.
Cosette
I have a report which has a memo field and 3 associated textboxes below the memo. I have set up the report to have the option to show the txtbox or not 'on Open'. When the text boxes are not visible, I want them to take no space at all such that more memo fields can be displayed per page. To that end, I have toyed with code that just don't work:
Code:
Private Sub Report_Open(Cancel As Integer)
Dim IntAnswer As Integer
IntAnswer = MsgBox("Show $$ amounts?", vbYesNoCancel, "Estimate Report")
If IntAnswer = vbYes Then
Me!txtEstimateAmount.Visible = True
Me!txtTaxAmount.Visible = True
Me!txtTotal.Visible = True
ElseIf IntAnswer = vbNo Then
Me!txtEstimateAmount.Visible = False
[COLOR=red yellow]Me!txtEstimateAmount.Height = 0[/color]
Me!txtTaxAmount.Visible = False
[COLOR=red yellow]Me!txtTaxAmount.Height = 0[/color]
Me!txtTotal.Visible = False
[COLOR=red yellow]Me!txtTotal.Height = 0[/color]
ElseIf IntAnswer = vbCancel Then
DoCmd.CancelEvent
End If
End Sub
I first tried the size attribute, that didn't work. I now tried height, and it doesn't work either. I am sure that something works, just don't know what it is.
Thank you for the help.
Cosette