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 Programming / February 2008

Tip: Looking for answers? Try searching our database.

Max with a condition

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
guat - 29 Feb 2008 13:40 GMT
Hi,
I have an ID for a database that is not an auto number; I'm manually
increasing the number by 1 for the next new record as below:
Me.HRID = DMax("[ID Template]", "Offer Letter
Information") + 1

QUESTION:  I want it to look at the max for only the records that are under
5,000.  5,000 is where I have started the records for a separate sub-company.
Did I describe that well?  

THANK YOU!
Klatuu - 29 Feb 2008 14:42 GMT
Put the criteria in the DMax call:
   Me.HRID = DMax("[ID Template]", "Offer Letter Information", "[ID
Template] < 5000") + 1
Signature

Dave Hargis, Microsoft Access MVP

> Hi,
> I have an ID for a database that is not an auto number; I'm manually
[quoted text clipped - 7 lines]
>
> THANK YOU!
 
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.