R
Richard Horne
I have a order form with a tick box which when clicked on runs a series of
checks to check certain options against the order.
The system should work as follows..
When Order_Entry_Complete is clicked,
check to see if the order is on a proforma basis
if it is then do nothing and accept the order..
If the order is not proforma then check to see that the order total is not
greater than the customer's credit limit. If it is, display a msg box warning
them of this but allow them to click ok anyway or cancel.
If it iisn't, display a msgbox informing that user that when they click ok
the order will be accepted and they won't be able to make any changes.
I've got 99% of the code for this, but I can't seem to work out where and
how to end my if and if statements and it's annoying me as it's relatively
simple but just doesn't quite work.
Private Sub Order_Entry_Complete_Click()
If Terms = "Proforma" Then
Me.Requery
Exit Sub
Else
If Me.OrderTotal > Me.CreditLimit Then
RetValue2 = MsgBox("This order is for a higher value than this customer's
credit limit! Check with Robin and Karen before proceeding! If you click OK,
this order will be accepted, click cancel if you need to consult
management.", vbOKCancel)
End If
If RetValue2 = vbOK Then
Me.Requery
Else
Exit Sub
End If
Else
RetValue3 = MsgBox("By clicking OK you confirm that you have finished
entering all the details for this order. If you have not finished, then click
cancel.", vbOKCancel)
If RetValue3 = vbOK Then
Me.Requery
Else
Order_Entry_Complete = False
End If
End Sub
checks to check certain options against the order.
The system should work as follows..
When Order_Entry_Complete is clicked,
check to see if the order is on a proforma basis
if it is then do nothing and accept the order..
If the order is not proforma then check to see that the order total is not
greater than the customer's credit limit. If it is, display a msg box warning
them of this but allow them to click ok anyway or cancel.
If it iisn't, display a msgbox informing that user that when they click ok
the order will be accepted and they won't be able to make any changes.
I've got 99% of the code for this, but I can't seem to work out where and
how to end my if and if statements and it's annoying me as it's relatively
simple but just doesn't quite work.
Private Sub Order_Entry_Complete_Click()
If Terms = "Proforma" Then
Me.Requery
Exit Sub
Else
If Me.OrderTotal > Me.CreditLimit Then
RetValue2 = MsgBox("This order is for a higher value than this customer's
credit limit! Check with Robin and Karen before proceeding! If you click OK,
this order will be accepted, click cancel if you need to consult
management.", vbOKCancel)
End If
If RetValue2 = vbOK Then
Me.Requery
Else
Exit Sub
End If
Else
RetValue3 = MsgBox("By clicking OK you confirm that you have finished
entering all the details for this order. If you have not finished, then click
cancel.", vbOKCancel)
If RetValue3 = vbOK Then
Me.Requery
Else
Order_Entry_Complete = False
End If
End Sub