Re: Validation Rule

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Marshall,

I have checked the fields required porperty to yes and allow zero length
property to no but the problem I seem to have now is its not very user
friendly with regards to the message which is presented to the user when
they forget to complete the field eg The field 'tblcustomers.title' cannot
contain a null value because the required property for this field is set to
true, Enter a value in this field. The system then asks be to close the form
anyway and I select no and get an action failed dialogue message.

Does anyone have any suggestions?


"Marshall Barton" <marshbarton@xxxxxxxxxx> wrote in message
news:prkrm21iccrv7vr2iguitajqblsg93v19u@xxxxxxxxxx
SG wrote:

I have setup a validation rule of Not "" but it still allows the form to
be
saved even though the field has been left empty??


Check the table field's Required property. This prevents
Null values from being saved. I think you want this set to
Yes. This translates to the validation rule Is Not Null.

Check the table field's AllowZeroLength property. This
prevents empty string values from being saved. It sounds
like you want this property set to No. I think this
corresponds to a validation rule similar to <> ""

--
Marsh
MVP [MS Access]


.



Relevant Pages

  • Re: Coerce Null to Zero?
    ... Is there a similar technique for coercing it to Zero with numeric fields? ... lRes = Val) ... I prefer an empty string to zero as a default value, ...
    (microsoft.public.vb.syntax)
  • Re: Coerce Null to Zero?
    ... IOW, just consider the field at its ... lRes = Val) ... I prefer an empty string to zero as a default value, ...
    (microsoft.public.vb.syntax)
  • RE: How does defined work?
    ... Both Zero "0" and empty string " " are defined values in Perl, ... ||I am posting this query in beginners instead of beginners-cgi because I ... ||How can I make this execute the die statement when userId is missing from ...
    (perl.beginners)
  • Re: strncmp(a,b,0)
    ... > Now I have it to return zero. ... characters (characters that follow a null character are not ... or less than the possibly null-terminated array ... Don't you think one empty string is equal to another empty string? ...
    (comp.lang.c)
  • Re: Update table with Null data
    ... NOTE that inserting a null into a field or leaving it null is never a good ... an empty string or even the word "Null" allows Access to actually use ... > actually a zero length string. ... > Microsoft Access MVP ...
    (microsoft.public.access.forms)