June 19, 2006 at 9:00 am
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
June 19, 2006 at 11:24 am
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
June 21, 2006 at 2:17 am
Would it be possible to show a working example please
June 21, 2006 at 6:41 am
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
June 21, 2006 at 7:45 pm
June 22, 2006 at 3:31 pm
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