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

Resizing Textboxes on Format

Status
Not open for further replies.

turtlemaster

Programmer
Oct 4, 2001
93
US
I have a subform on a report and I want to resize the text boxes to the size of the largest one after it grows to the appropriate size.

For example;

If it the description field is the tallest than I want to set the height of all the boxes to the height of the description.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
JobID.Height = Description.Height
Qty.Height = Description.Height
Item.Height = Description.Height
UnitPrice.Height = Description.Height
Price.Height = Description.Height
End Sub

However, nothing happens. No Errors just nothing happens. The text boxes are all the original size except for the one that grew by default. I know this can be done but I'm not sure what I'm missing.

P.S. I've tried to put this code in the OnPrint event but it just generates an error.
 
Oh, now turtlemaster I resisted that one.

Now I do feel righteous


G LS

Have a good weekend everyone.
Bye
 
Did anyone figure this out? I'm trying to do the same thing and it's killing me.
 
Well, I suppose I'll post this for archive-purposes in case anyone is looking, but I just found what I think is the unsolvable issue with this - According to the help pages [god forbid i read those], OnFormat fires before Microsoft Access formats the section for previewing or printing.

Hence you can't set or compare Height as it hasn't been handled yet.

C'est la vie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top