userip = MsgBox("Do you want to enter a MID for the following Agreement " & vbNewLine & vbNewLine & "Legal Name - " & Me.List359.Column(2) & " " & vbNewLine & "Trading as Name - " & Me.List359.Column(3) & vbNewLine & vbNewLine & " This will mark the agreement as approved and enable it for E-Delivery", vbYesNo)
If userip = 6 Then
Dim sqlmid As String
Dim sqlmidcheck As String
Dim amexmid As String
Dim sqltemp As String
Dim inputdate As String
Dim datetoday As String
datetoday = Format(DateTime.Now, "yyyy-mm-dd hh:mm:ss")
datetoday = datetoday & ":000"
sqlmid = InputBox("Please Please enter a MID Number", "New MID")
If Len(sqlmid) = 8 Then
sqlmidcheck = InputBox("Please Confirm that the MID number " & sqlmid & " is corret", "Confirm MID")
If sqlmid = sqlmidcheck Then
sqltemp= "111"
CurrentProject.Connection.Execute _
"Update [v_sentto] Set [v_sentto].[MID] = '" & sqlmid & "' where [v_sentto].Auto = '" & Me.List359.Column(0) & "'"
enteramexmid:
userip = MsgBox("Would you like to enter an AMEX MID for this agreement?", vbYesNo)
If userip = 6 Then
amexmid = InputBox("Please enter an AMEX MID (10 Charachters)", "AMEX MID")
If Len(amexmid) = 10 Then
sqltemp = "123"
CurrentProject.Connection.Execute _
"Update [v_senttosms] Set [v_senttosms].[AMEX MID] = '" & amexmid & "' where [v_senttosms].Auto = '" & Me.List359.Column(0) & "'"
Else
MsgBox "Amex MID's MUST be 10 Charachters long. Please Re-Enter the Amex MID"
GoTo enteramexmid
End If
End If
CurrentProject.Connection.Execute _
"Update [v_sentto] Set [v_sentto].[Date Approved / Declined] = '" & datetoday & "' where [v_sentto].Auto = '" & Me.List359.Column(0) & "'"
CurrentProject.Connection.Execute _
"Update [v_sentto] Set [v_sentto].[Hypercom Template] = '" & hypercomtemplate & "' where [v_sentto].Auto = '" & Me.List359.Column(0) & "'"
CurrentProject.Connection.Execute _
"Update [v_sentto] Set [v_sentto].[PrintConf] = 'Yes', [v_sentto].[PrintWelcome] = 'No' where [v_sentto].Auto = '" & Me.List359.Column(0) & "'"
CurrentProject.Connection.Execute _
"Update [v_sentto] Set [v_sentto].[Internal Status] = 'Approved' where [v_sentto].Auto = '" & Me.List359.Column(0) & "'"
MsgBox "MID - " & sqlmid & vbNewLine & vbNewLine & " AMEX MID - " & amexmid & vbNewLine & vbNewLine & " has been entered for '" & Me.List359.Column(2) & "'"
Else
MsgBox "The MID's did not match, please try again."
End If
Else
MsgBox "a MID must be 8 characters long. Please re-enter the mid Correctly"
End If
Else
MsgBox "MID has not been updated"
End If
Me.List359.Requery
|