Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to customize MsgBox

Status
Not open for further replies.

hu5

Technical User
Apr 9, 2004
28
US
Hi
I put a command button to move 2 types of records. But have problem using MsgBox for user selection.
I try to modify the system MsgBox, but it didn't sound right. How do I replace "yes" and "no" to "ARCHIVE" and "INACTIVE" option? Thank you for help.

Private Sub MoveRecord_Click()

If MsgBox(" Are you moving Archive Records? Click Yes to move Archive Records, click No to move Inactive Records.", 36, "Which records to move") = vbYes Then

On Error GoTo Err_MoveToArchive_Click

Dim stDocName1 As String
Dim stDocName2 As String

If DCount("*", "[certStatus]", "Status Like '*archive*'") = 0 Then

MsgBox ("No more archive record to move.")
Exit Sub
End If
...
else
On Error GoTo Err_MoveToInactive_Click
..


 
You may consider creating a small modal form with your customized commandbuttons.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top