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!

One command button has 2 selection 1

Status
Not open for further replies.

hu5

Technical User
Apr 9, 2004
28
US
I put a command button for user to move 2 type of records to 2 separate tables: The caption is "Move completed/inactive records to archive".

When user click the button, it should give 2 choices, "completed" and "inactive", like msgBox or pop-up.
I don't know how to use the msgBox, they seems to design for system message, like vbYes, vbNo....
Can anyone give me an idea how to customize the msgBox ? Thank you.
 
In the immediate window (Ctrl G) type msgbox and press the F1 key.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
You are correct in that you have very little customization capabilities on the system MsgBox. In this case, why not have two command buttons, one for Move Completed, and one for Move Inactive?

Or you could have two radio buttons, one for each option, and control the process from the radio button click event.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
you could try a messagebox like
Code:
Private Sub Command2_Click()
On Error GoTo Err_Command2_Click

    Dim stDocName, iss, Reply As String
    Reply = MsgBox("Do you want it to be inactive? ", 36, "Which Move")
        If Reply = 6 Then
    do your code for inactive
    Else
    do your code for completed
    End If

Exit_Command2_Click:
    Exit Sub

Err_Command2_Click:
    MsgBox Err.Description
    Resume Exit_Command2_Click
    
End Sub

Hope this helps
Hymn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top