Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

dMax syntax for multiple criteria not working

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lolie - 22 May 2008 21:56 GMT
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.