Full Version: msgbox "yesno" in other language?
UtterAccess Forums > Microsoft® Access > Access Forms
YZF
Hi, is it possible to have msgbox, with options "yes" and "no" but in other language than english?
mean using "vbYesNo" in vba.
Thank you
kuifjexx
I think it is not possible .. but you can create your own messagebox ...
The attachment I found that a while ago, it is an example of how to create your own messagebox.
Oadded the Acc2K-version
Greetz from Belgium compute.gif
Luc aka Kuifjexx
YZF
I would like to have confirmation box in my form, when i press delete button. After I press "yes" in my msgbox, it deletes record from my Mainform
yes" should be written in other language.
Ocan create simple form, and make it as msgbox, but then i need to write some code for button "yes" to delete record from my Mainform.
Maybe any ideas how to do it? In other words i need to press button on one form, and make it delete record(s) from another form....
kuifjexx
Hereby an example to delete the current record on the mainform with the default msgbox
CODE
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click
nbsp; DoCmd.SetWarnings False
  If MsgBox("Confirm deletion of the record?", vbQuestion + vbYesNo + vbDefaultButton2, "Delete?") = vbYes Then
    DoCmd.RunCommand acCmdSelectRecord
    DoCmd.RunCommand acCmdDeleteRecord
  End If
Exit_cmdDelete_Click:
  DoCmd.SetWarnings True
  Exit Sub
Err_cmdDelete_Click:
  MsgBox Err.Description & "(" & Err.Number & ")"
  Resume Exit_cmdDelete_Click
End Sub

HTH
Greetz from Belgium compute.gif
Luc aka Kuifjexx
SerranoG
To address your message box question button language directly, the short answer is no. But you can create a small dialog box type of form and insert your own buttons in it that have captions in whatever language you want (barring any font restrictions on your computer).
kuifjexx
For the other language:
See the example .. personalize the msgbox by creating your own dialogform with your own labels on the command button
ees us informed if suggested code(see other post) and creating your own msgbox succeeds
Greetz from Belgium compute.gif
Luc aka Kuifjexx
YZF
This code is for "msgbox" function, but i don't use it. I created simple form, which would be as msgbox.I have two buttons there "Yes" and "No" (their lables are in my language)
Oentered in the yes_button_click event
"DoCmd.RunCommand acCmdSelectRecord"
"DoCmd.RunCommand acCmdDeleteRecord"
but it shows error:
The command or action "Delete Record" isn't available now..
Somehow i need to have a code for button click (in my form), that when i press it, it deletes current record in another form (which is currently open).
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.