Link to home
Start Free TrialLog in
Avatar of 25112
25112

asked on

avoid question message box

hi, in the below code, how can we avoid the question and still do a full processing? (there is no decision making needed anymore.. the equivalent of "Yes" should be the default.. can you suggest how this code should be changed to accomplish this? thanks-
=============================
 Dim msg As String
  msg = "Would you like to process all (" + LTrim(Str(NumRecsToDo)) + ") records for: " + _
         Chr(13) + Chr(10) + Chr(13) + Chr(10) + Sender1 + IIf(Len(Sender2), " ," + Sender2, "")
  Response = MsgBox(msg, vbYesNoCancel + vbQuestion, "Process Confirmation")
  Select Case Response
    Case 6
      'Process All Records
      LabNum = 0
    Case 7
      Set db = CurrentDb()
      RecSource = "AFRTesting Where Report_Num = '" + ReportNum + "';"
      Set Ds2 = db.OpenRecordset("Select * From " + RecSource, dbOpenDynaset)
      Ds2.MoveLast
      NumRecsToDo = Ds2.RecordCount
 
    Case 2
      MsgBox "AFR Report Request Cancelled By User"
      Exit Sub
  End Select
SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial