If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Field Validation
Hi, in a table I have ytwo date fields. i want to put a validation on the
second field so that it cannot be earlioer than the first field. is this possible please in a table design? Thanks Alex |
#2
|
|||
|
|||
Field Validation
Yes, it's possible, but you cannot place this in the Validation Rule of one
of the fields, since you don't know which one will be filled in first. For comparision between fields use the Validation Rule of the table--entered in the Properties box (View menu in table design), not the Validation Rule of the field (lower pane of the table design window.) The validation rule could be: EndDate = StartDate In earlier versions of Access that would have the side-effect of making both fields required, so you might want to use: (StartDate Is Null) OR (EndDate Is Null) OR (EndDate = StartDate) -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Alex H" aph@no-misnet-spam-co-uk wrote in message ... Hi, in a table I have ytwo date fields. i want to put a validation on the second field so that it cannot be earlioer than the first field. is this possible please in a table design? |
#3
|
|||
|
|||
Field Validation
Alex H wrote:
Hi, in a table I have ytwo date fields. i want to put a validation on the second field so that it cannot be earlioer than the first field. is this possible please in a table design? Yes, but you have to use a *Table* validation rule, not a *Field* validation rule because field validation rules are not allowed to reference other fields. In the property sheet for the table in design view you will find a validation rule. In that enter... [SecondDateField] = [FirstDateField] -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
#4
|
|||
|
|||
Field Validation
Thanks Both - perfect !
Alex "Alex H" aph@no-misnet-spam-co-uk wrote in message ... Hi, in a table I have ytwo date fields. i want to put a validation on the second field so that it cannot be earlioer than the first field. is this possible please in a table design? Thanks Alex |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Memo Field | Sam | General Discussion | 12 | November 10th, 2005 09:16 PM |
validation rule dependent upon another field | warnett | General Discussion | 1 | September 24th, 2005 08:03 PM |
Field Validation Rule fails in VBA ! | Arnaud Lesauvage | General Discussion | 0 | September 7th, 2005 01:57 PM |
Syntax needed to get needed reports | Frank Lueder | New Users | 15 | January 6th, 2005 08:39 AM |
ASK Field Behavior | Greg | Mailmerge | 9 | July 2nd, 2004 02:44 PM |