In the BeforeUpdate event of the form, check for the customer and the last
date you made an entry for that customer. If it has been less then 30 days,
Cancel the update and inform the user using a MsgBox.
To lookup the customer, use the DMax function to get the last entry for the
customer.
Example:
dteLastDate = DMax("[DateField]", "[TableName]", "[CustomerID]=" &
Me.txtCustomerID)
If dteLastDate > Date - 30 Then
Cancel = True
MsgBox "You can only make an entry every 30 days!", vbOkOnly +
vbInformation, "Too Soon"
End If
--
Wayne Morgan
MS Access MVP
Frank Dulk said:
how do I do to prohibit the entrance of a record if it goes of the same
customer and with the smaller date than 30 days?