Dynamic Textbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I adjust a textbox so it will only be as wide as the data in the
associated field? I have the textbox properties to grow and shrink, but that
only affects the height of the box. I'm using the Trim() function in order
to put a comma after the Last Name (It shows LName, FName - each in it's own
textbox), but that doesn't affect the textbox size! I'm hoping it's an easy
fix, but am having a terrible time finding any info on this. Any help you
can give would be greatly appreciated!
 
If you are just trying to get the LastName and first name to line up try

Trim([LastName]) & ", " & Trim([FirstName])

Adjusting the text box size can be done and then moving the text box to the
correct position next to the textbox with the last name can be done.
HOWEVER, it will take some fairly complex code. There is probably a
solution at
www.lebans.com
that will allow you to do that.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Thank you so much for the help! I simply changed it to one text box with the
code you suggested and it works great :) I'm grateful it boiled down to an
easy fix!

John Spencer said:
If you are just trying to get the LastName and first name to line up try

Trim([LastName]) & ", " & Trim([FirstName])

Adjusting the text box size can be done and then moving the text box to the
correct position next to the textbox with the last name can be done.
HOWEVER, it will take some fairly complex code. There is probably a
solution at
www.lebans.com
that will allow you to do that.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Gelpaks said:
How can I adjust a textbox so it will only be as wide as the data in the
associated field? I have the textbox properties to grow and shrink, but
that
only affects the height of the box. I'm using the Trim() function in
order
to put a comma after the Last Name (It shows LName, FName - each in it's
own
textbox), but that doesn't affect the textbox size! I'm hoping it's an
easy
fix, but am having a terrible time finding any info on this. Any help you
can give would be greatly appreciated!
 
Back
Top