Validating Field on basis of Field of other table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to ensure that user does'nt put date in credit note form which is less
than invoice no record. For X invoice, credit note date should not be lower
than invoice date.
 
You can set a validation rule:
[Forms]![FormName]![Invoice Date]

Note: You'll need to set one in the form's Before Update event as well (or
perhaps instead) because they may enter the invoice first (aircode):

Sub Form_BeforeUpdate(Cancel As Integer)
If Me.[InvoiceDate] < Me.[Credit Note Date] Then
MsgBox "No way, Jose", vbOKOnly, "NO! Bananna"
Cancel = True
End If
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top