Validation Rule

Posted on 2006-05-16
Last Modified: 2008-03-18
I have an Access 2K database running in 2003 and i am having some validation rule problems.

For some reason it doesn't seem to like the wild card character.

if i give it the rule [ALike 'a*'] then it will only accept the characters 'a' and then '*'. rather than accepting 'aa' or 'abc'

What am i doing wrong?

Kind  regards

Question by:dchoxford
    LVL 58

    Expert Comment

    Hello dchoxford

    Have you tried just this:   Like 'a*'
    You do not need the field name in a validation rule for a simple expression like that.


    Author Comment

    Yes i have, the square brackets were to denote the text rather than using quotes that i thought would be confusing in the instance.

    It works under 2K but not as a 2K file opened in 2003

    LVL 61

    Accepted Solution

    This is a long shot...
    Check under tools -> options under the Tables/queries  tab.  If The checkbox under SQL server compatible syntax (ANSI 92) is checked, I think the  %  wildcard would be recognized instead of  *.
    LVL 15

    Expert Comment

    Could also try a forced concatenation like this:

    Like 'a' & '*'

    Author Comment

    thanks mbizup,

    Because i'm using the .ade A2003 seems to be using the SQL server compatible syntax which isn't the case for the users still on A2K. I'll just take off validation rules until all the clients are on the same version.
    LVL 61

    Expert Comment

    Glad I could help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now