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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

non visible txtboxes height problem

Status
Not open for further replies.

Cosette

Technical User
Nov 30, 2004
98
US
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:

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
 
Actually, making the txt boxes invisible should be enough.

You can then set the "CanGrow" property of the memos
and maybe the report section to true or set a specific height for the memo boxes.
Note that in code measurements are in twips, 1 inch=1440 twips!

I've tried the Height=0 setting and it worked fine here,

TomCologne
 
Tom,

Thanks for the reply. You put me in the irght direction...I didn't realize that there was a can grow and can shrink for the detail section of the report. I had ommitted to change these settings.

Thanks again

Cosette
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top