T
Toco
Hello, I have msgbox using VBYesNo as buttonstyle. My goal is is, if the
user select Yes, then .... (do something), or if they select no, Exit Sub
Here is sample code
Dim strSQL As String, rsOne As ADODB.Recordset
strSQL = "Select custID from tbCustomerLetters"
rsOne.Open strSQL, CurrentProject.Connection, adOpenStatic,
adLockReadOnly
With rsOne
'If .RecordCount = 0 Then MsgBox "No customer were processed
in your query", 64 + 0, "No Letters printed"
''Go To EndRoutinue
MsgBox ("Continue?"), vbYesNo, ("There are " & .RecordCount & "
letters to be printed")
Here is where I need to add code to perform action based on user input. I
know you can do this in VB environment with the DialogResult property by
passing the argument, but I cannot figure out the way to perform this in VBA.
Any ideas?
user select Yes, then .... (do something), or if they select no, Exit Sub
Here is sample code
Dim strSQL As String, rsOne As ADODB.Recordset
strSQL = "Select custID from tbCustomerLetters"
rsOne.Open strSQL, CurrentProject.Connection, adOpenStatic,
adLockReadOnly
With rsOne
'If .RecordCount = 0 Then MsgBox "No customer were processed
in your query", 64 + 0, "No Letters printed"
''Go To EndRoutinue
MsgBox ("Continue?"), vbYesNo, ("There are " & .RecordCount & "
letters to be printed")
Here is where I need to add code to perform action based on user input. I
know you can do this in VB environment with the DialogResult property by
passing the argument, but I cannot figure out the way to perform this in VBA.
Any ideas?