MSGbox

  • Hi ,

    I want to add colour and change text style of the msbox. is this possible ? Are there any customized features for the msgbox.

    regards

    Ritesh

     

    If Me.Patient_ID.Value = "303" Then

     MsgBox " This Patient has changed her name ", vbOKOnly

    End If

  • Ritesh, 

    No way to customize msgbox, but it would be very easy to write your own popup form just the way you want it.  Use a function to do the actual opening of the form, and that way you can pass in the parameter you want to control color, etc. on your own msgbox form.

    Vic

     

    [font="Comic Sans MS"]Vic[/font]
    www.vicrauch.com

  • Would it be possible to show a working example please

     

  • Ritesh,

    This is just a normal form within Access.  The only difference is that when you open the form, you would use this type of line in your VBA:

    DoCmd.OpenForm "frmName",acNormal,,,,acDialog,"Color=Red;Style=MyStyle; " & _ 

      Text=This is where I would put whatever I want the message to say"

    The last bit of this command is the "OpenArgs".  This means that your form has all this text available to it using the "Command" keyword within your VBA code.

    HTH,

    Vic

     

    [font="Comic Sans MS"]Vic[/font]
    www.vicrauch.com

  • The message box can be changed by right clicking on the box while in design format. Select properties, this brings up a list of parameters. Color and font are listed and can be changed here.


    Kindest Regards,

    Just a bozo on this bus

  • Since you formatted your openargs string as "paramname=paramvalue;", I'll mention to the OP, who may not know, that the routine adhGetItem, and its siblings adhPutItem and adhDeleteItem, are very useful for creating and parsing such strings.

    They are by Ken Getz, found on the CD that accompanies the Access Developer's Handbook, and possibly around the internet these days.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply