Avatar of Chuck Lowe
Chuck Lowe
 asked on

Custom message box issue

We have a custom messagebox. Due to the fact of company logo, colors etc. Can't get away from that.
the code on the form is

Private Sub Form_Load()
    On Error GoTo ERR_SUB
   
        Me.lblMessage.Caption = Me.OpenArgs 'Value which is passed in
       
Sometimes the data is large (number of characters) I want to pass. I get an error that the OpenForm Action was cancelled.
I'm not sure if this is due to the string limitation (255) or that it's displaying in a label or both. The individual lines have vbCrLf so the display is nicely formated. Is my limitation the string length? The caption length? Should I use a textbox? Or should I change it to a ListBox?

Thanks.
Microsoft Access

Avatar of undefined
Last Comment
Chuck Lowe

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Rey Obrero (Capricorn1)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Anders Ebro (Microsoft MVP)

Well, the openargs is not limited to 255 characters, so that can't be it. I'm guessing something else is going on, perhaps there is code you are not showing us?

And note, if your form is allready open in design mode, because your testing or similar, then the OpenArgs are NOT passed to the form. So make sure your form is properly closed, before testing it.
Jeffrey Coachman

And lets be clear, ...the title here is a bit misleading, ...
This is not a "messagebox" (object), ...it seems to be a form with custom text that appears in a label...

Note here that you are not giving us an example of this mystery, long, string, ...or telling us how you are incorporating the vbcrlf...

Can you post the entire code please?
There are many reasons why the load event could be canceled.
Chuck Lowe

ASKER
@Rey
Thanks. That worked fine
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck