Hi,
I'm having a lot of trouble with this syntax. It's supposed to return the
termination_date from the current participant_id's most previous match.
DMax("match_terminated", "tbl_match", "participant_id=" & Me.participant_id
& "AND "match_terminated<" & match_date)
Any ideas greatly appreciated!
Beetle - 22 May 2008 22:59 GMT
Assuming that match_date is a date/time field, you need to add date
delimeters. Try;
DMax("match_terminated", "tbl_match", "participant_id = " & Me.participant_id
& " AND match_terminated < #" & match_date & "#")

Signature
_________
Sean Bailey
> Hi,
> I'm having a lot of trouble with this syntax. It's supposed to return the
[quoted text clipped - 4 lines]
>
> Any ideas greatly appreciated!
Lolie - 22 May 2008 23:11 GMT
Thank yoU! That worked fantastically!
> Assuming that match_date is a date/time field, you need to add date
> delimeters. Try;
[quoted text clipped - 10 lines]
> >
> > Any ideas greatly appreciated!
fredg - 22 May 2008 23:15 GMT
> Hi,
> I'm having a lot of trouble with this syntax. It's supposed to return the
[quoted text clipped - 4 lines]
>
> Any ideas greatly appreciated!
I assume [Participent_ID] is a Number datatype?
& "AND "
^
You need to include a space after the " and before the word AND.
& "AND "match_terminated<"
^
This " is incorrect. You must include the criteria field
[match_terminated] inside the string. You have it outside.... because
of that incorrect ".
The [Match_date] value is correctly outside the string.
Date datatype values must be surrounded with the date delimiter symbol
#.
DMax("[match_terminated]", "tbl_match", "[participant_id]=" &
Me.[participant_id] & " AND [match_terminated] < #" & [match_date] &
"#")

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail