formatting the labels in forms

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

Guest

Dear experts,

I have a label, info_lbl, who's value is dynamically updated. e.g

info_lbl = "Current user " & userID & "last login time:" & logTime

I need to print the varibale logTime alone in bold. If i use 2 labels, i.e.
seperate label for logTime, then I face length problem, because userID can
take different length depending up on the user. So the placement of send
label sometimes getting merged with the first one.

Please help me in solving this.
 
Hi Raj

You mention 'print' so, presumably, you are printing a report.

If so, you could use the 'TextWidth' method to determine the length of the
text in the first label, then use this value to 1. set the width of the 1st
label, then 2. set the Left property of the second label.

See VBA Help files for help with the TextWidth method.

Cheers.

BW
 
Back
Top