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 / January 2005

Tip: Looking for answers? Try searching our database.

Return Most Recent Value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sheri Emery - 18 Jan 2005 23:19 GMT
I am wondering if there is a way to write an expression
that would cause the most recent update to be plugged into
one of the fields on my form/table.  I have a Client table
that includes demographic data and other types of
information about each participant that we see.  I also
have another table (Supervision Level) table that records
Supervision Level for each client (a client may go through
several levels of supervision before completing the
program).  I would like the Supervision Level on the
Client table to be filled with the most recent supervision
level from the Supervision Level table.  Basically, if the
client moved from a Level 3 to a Level 4, I would like the
Client table to indicate that the client is on level 4.  
This is important because several reports are grouped
based on the level of supervision. A few weeks ago, a
couple of individuals gave me some advice about this thing
regarding DMAX and MAX, but I must have missed something
as I attempted to work through it.  Any help is greatly
appreciated.
Thanks,
Sheri
PC Datasheet - 19 Jan 2005 00:43 GMT
The highest Level is a calculated value and as such should NOT be stored in
a table. When you need to display it in a form or report, you should
calculate it at that point in a query or with the DMax function.

--
                                       PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
                             resource@pcdatasheet.com
                                www.pcdatasheet.com

> I am wondering if there is a way to write an expression
> that would cause the most recent update to be plugged into
[quoted text clipped - 17 lines]
> Thanks,
> Sheri
Sheri Emery - 19 Jan 2005 00:55 GMT
I'm sorry - I don't quite understand what you are saying.  
I want my table to be filled with the most recent value.  
Clients are assigned a supervision level of 1-4, which can
change often during their stay in the program.  We need to
track the supervision level (as well as dates of change,
reason for change, etc.)  I would like the most recent  
supervision level to appear in my reports though.  Thanks
for any help.
Sheri
>-----Original Message-----
>The highest Level is a calculated value and as such should NOT be stored in
[quoted text clipped - 30 lines]
>
>.
PC Datasheet - 19 Jan 2005 01:37 GMT
You need three tables:
TblSupervisionLevel
SupervisionLevelID
SupervisionLevel
Rank        '1 being lowest, 4 being highest

TblClient
ClientID
etc

TblClientSupervisionLevel
SupervisionLevelID
ClientID
SupervisionLevelID
DateAssignedLevel
ReasonAssignedLevel

For your report, create a query based on the three tables. Include all the
fields you need for the report and be sure to include Rank. Change the query
to a Totals query by clicking on the Sigma (looks like E) button on the
toolbar at the top of the screen. In the query grid, change Group By under
Rank to Max.

--
                                       PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
                             resource@pcdatasheet.com
                                www.pcdatasheet.com

> I'm sorry - I don't quite understand what you are saying.
> I want my table to be filled with the most recent value.
[quoted text clipped - 53 lines]
> >
> >.
 
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.