Thanks for your suggestion, Fredg.
But how do you suggest I make the unbound form fit the message? If I have
just one a few words in a large form, it would not make sense.
Please help again.
Does it really matter? If it does matter to you, no reason why you
can't simply have 2 different forms, one small the other large.
Simplest way to go.
or...
Look up the MoveSize method in VBA help.
You can position the form and also size it however you wish.
Just remember that all measurements are in Twips 1440 per Inch), so
DoCmd.MoveSize , , 2880, 1440
will size the form 2" x 1".
You can concatenate size instructions onto the OpenArgs argument when
you open the message form:
DoCmd.OpenForm "MessageForm" , , , , , acDialog,"Your
Message|2880,1440"
Then parse the OpenArgs into the message and size wanted by searching
for the "|" separator in the Message form's Load event.
Private Sub Form_Load()
If Not IsNull(Me.OpenArgs) Then
Dim strMessage As String
Dim strSize As String
Dim intX As Integer
Dim intY As Integer
strMessage = Left(OpenArgs, (InStr(OpenArgs, "|") - 1))
strSize = Mid(OpenArgs, InStr(OpenArgs, "|") + 1)
intX = Val(Left(strSize, InStr(strSize, ",") - 1))
intY = Val(Mid(strSize, InStr(strSize, ",") + 1))
DoCmd.MoveSize , , intX, intY
' Include code here to also re-size the label to 1/2 the width and
' height of the form. Note: you can also resize according to the
' number of characters in the strMessage. The choice is yours.
' Reposition the controls also, if needed. Experiment.
Me.LabelName.Height = intY/2
Me.LabelName.Width = intX/2
LabelName.Caption = strMessage
End If
End Sub
You'll have find the method that works for you.