needadvice
Programmer
I have a table with a numeric field. The value entered into that field must not be higher than a related field. How do I put a restriction on the table to prevent entering a value higher than the related field.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim lngTest as Long
lngTest = DMax ("[lngSecondField]", "YourTable", "YourWhereClause")
if lngTest <= Me.lngFirstField then
MsgBox "Must be higher than " & lngTest
Cancel = True
Me.lngFirstField.SetFocus
end if