Queries :: Retrieving Record Details With Max Value Date Field

Mar 26, 2013

I am trying to retrieve data for a particular record.

When Project field matches a certain project number I want it to pick the record with the latest date in the date field field to select certain data fields(Owner & Rating) from that record.

Below is my attempt. However the problem is that displays all records with that project number and not just the record with the latest date.

Code:
SELECT [Combined PRB Roadmap].ProjectNumber, Max([Combined PRB Roadmap].DateField) AS MaxOfFDateField, [Combined PRB Roadmap].Owner, [Combined PRB Roadmap].Rating
FROM [Combined PRB Roadmap]
GROUP BY [Combined PRB Roadmap].ProjectNumber, [Combined PRB Roadmap].Owner, [Combined PRB Roadmap].Rating
HAVING ((([Combined PRB Roadmap].ProjectNumber)="NR-4237"));

View Replies


ADVERTISEMENT

Queries :: Double Click On Results In Order To Go To Original Record Or See More Details

Jun 2, 2015

Is it possible to once you have run a query be able to somehow double click on the results in order to either go to original record or see more details? Similar to "show details" in excel?

I have made some queries that are working well however they are specific in nature and once found display a list of results. I have left a field that uniquely identify them and are after a quick way to view the details of the results from the query rather than take the ID# and manually search the original table.

View 8 Replies View Related

Queries :: Show Unfiltered Details Of Field

Oct 25, 2014

The programmer who we had used is not available and I would like to see the Unfiltered Details of the field

Code was : =DSum("Deposit_Amount","c_Deposit_Slip_Lines","Can celed=False and c_Deposit_Slip_Header_ID=" & [ID])

I want to see the Deposit amount unfiltered

i.e.: Deposit amount $1,234.56

View 2 Replies View Related

Queries :: Calculated Field To Find Latest Date For Each Record

Jul 11, 2015

If I have four date Fields in a query, Astart, Bstart, Cstart, and Dstart and want to have a calculated field to find the latest date for each record how would I do that? I have tried things like:

LatestDate: MAX(Astart, Bstart, Cstart, Dstart).

View 2 Replies View Related

Retrieving Different Value Depending On Date Used

Dec 13, 2007

Hi Everyone.

Lets hope that after finding this forum, my slight problems will begin to ease off a little.

I am unfortunately one of those newbies trying to get in well above my head and level of ms access workings, but we all have to start somewhere, right?!

My problem at the moment is as follows:

The scenerio is i work for an excursions provider in Cyprus and I am trying to set up an online excursions site for them.

Now with any excursion, the price flutuates through the year when its low season, high season etc. I have built a MS Access database with the following tables so far.
Excursions details: this contains everything about the excursion on offer, along with additional columns for the price changes and dates that these apply for. ie. [adprice1][fromdate1][todate1], [adprice2][fromdate2][todate2] etc

Now what I am trying to acheive if at all possible is that when a viewer takes an interest in an excursion and selects the date they would like to go on the excursion, that the correct price is displayed for that specific time period i.e if it the date was betwen [fromdate1][todate1] or [fromdate2][todate2]

Is this at all possible and if so can someone please explain to me in real laymans terms what I need to do for this too occur within the database please.

Thank you in advance and sorry for waisitng anybody's time if this seems obvious to others and not myself!

Regards

2rsGarry

View 3 Replies View Related

Modules & VBA :: Retrieving Record Value

Mar 11, 2015

I'm trying to retrieve the value of a record in a table. Why doesn't this work:

tabName = "Plan Data"
Dim db As DAO.Database, rst As Recordset
Dim strQryWhole As String
Dim dbStatus As Integer, rcnt As Long

[code]....

View 5 Replies View Related

Modules & VBA :: Retrieving Last Record In A Table

Feb 23, 2015

why the below VBA code is not retrieving the last record in a table.

Dim db As Database
Dim rs As Recordset
Dim i As Integer
Set db = CurrentDb
Set rs = db.OpenRecordset("Table_Check_Number_List")

[code]....

View 3 Replies View Related

Modules & VBA :: Retrieving Last Modified Date From A File Uploaded In URL

Feb 3, 2014

Vbscript/vb macro code for retrieving the last modified date of a file uploaded in a URL.

I am able to get the file but wanted to get the last modified date of it.

View 5 Replies View Related

Viewing A New Form With More Details Of A Record

Nov 27, 2006

I have got a form with summarised data (of records) on view for people to look at. (this is a continuous form). For each record I would like to have a button that displayed another form with more details on it. So by pressing the button opposite a particular record it would take the Id value of the record and open another form (with more details) at that particular record.

I would be very interested in seeing this done with a macro if possible but beggers can't be choosers!

View 4 Replies View Related

Use Previous Fields Record Details

Jan 7, 2008

Dear Guru's,
Happy New Year 2008.

:confused:

I have a task of implementing a fleet fuel consumption. I have made a form where user logs in previous odometer and current odometer reading. I have been challenged to make the system to automatically use previous odometer reading next refuelling. Please assist.

Joseph Njoroge

View 6 Replies View Related

Printing Only One Record Details On Report

Jan 6, 2005

I have a form which is used for data entry for a new record only. I then wish to print some of this record's details on a report, using a command button on the form. At present I cannot filter to get just the current records details on the report - I am getting the report containing all records in the table.

Thank you

View 3 Replies View Related

Forms :: DLookup And MSGBOX With Record Details

Jun 18, 2015

I've got a form which holds data for employees, fname, lname, ..... and an entered date which defaults to now().

On the before update event, i have the following.

Code:
If DCount("*", "trainingdata", "[Empid]=" & Me!EmpID & _
" And [subjectid]=" & Me!SubjectID & _
" And [trainingdate]=#" & Me!TrainingDate & "#") > 0 Then
MsgBox ("This record already exists")
Cancel = True
Me.Undo
Me.SubjectID.SetFocus
End If
End Sub

With the above vba code, a msgbox pops up if the record combination already exists. What I would like to do is in the same msgbox have the "entered" date display and make the msgbox say something like.

This record already exists and was entered on 6/18/2015, [entered]...

View 5 Replies View Related

Forms :: Editing Record Details Not Allowed

Sep 28, 2014

I have had a form working for ages. It has a main form and eight subforms at the bottom of the form. The main form can be edited in all fields.

I have taken a copy, modified the form added new fields to the main source table and updated the query that feeds the form.

Now (in the copy environment) it won't allow me to edit any of the fields. All of the form control properties are the same as the working model (in the live environment) I can run the query by itself and all is OK

There is obviously some little control that I have inadvertently changed and can't see it.

View 1 Replies View Related

Queries :: Retrieving Multiple Rows And Placing In One String

Jan 31, 2014

I am trying to write a query that selects multiple rows of a table and puts those into a single string with a comma delimiter.

I want it to select all rows after a specific word is found in the row above and then stop selecting when another specific word below the last row is found.

Example below: >>>

The data i am using is very unorganised and has not headers, so I have to try and specific lines in order to allocate them to a specific user.

Sample Data:

IDFullContent
459Authorized Privileges:
460ACNT ALLSPOOL ALTPRI AUDIT BUGCHK BYPASS
461CMEXEC CMKRNL DIAGNOSE DOWNGRADE EXQUOTA GROUP
462GRPNAM GRPPRV IMPERSONATE IMPORT LOG_IO MOUNT
463NETMBX OPER PFNMAP PHY_IO PRMCEB PRMGBL
464PRMMBX PSWAPM READALL SECURITY SETPRV SHARE
465SHMEM SYSGBL SYSLCK SYSNAM SYSPRV TMPMBX
466UPGRADE VOLPRO WORLD
467Default Privileges:

Output Expected:
"
ACNT,ALLSPOOL,ALTPRI,AUDIT,BUGCHK,BYPASS,CMEXEC,CM KRNL,DIAGNOSE,DOWNGRADE,EXQUOTA,GROUP,GRPNAM,GRPPR V,IMPERSONATE,IMPORT,LOG_IO,MOUNT,NETMBX,OPER...etcc "

The delimiter can be anything.

View 1 Replies View Related

Input Fields To Change Record Details On A Form?

Aug 17, 2005

I have a query with the fields employee_name, shiftname, shiftdate and have set it up so that 2 input messages boxes popup allowing the user to input a shiftname (a,b,c) then a shiftdate. from this query i have created a form, but instead of having 2 message boxes popup on screen before the form is loaded is it possible to have 2 input fields on the form (one for shift date & one for shiftname) that allows the user to enter into these fileds whenever they wish provided the form is open and all the records bellow change matching the employee name with the corresponding shiftname & date?, any advice would be great.

View 4 Replies View Related

Forms :: Date Control In Header Updates Appointments In Details Section

Jul 3, 2013

Working in Access 2007 - I would like to have an updatable calendar in the header section of a form, and when this is changed by the user I would like the subforms (there are several) in the details section to be updated with various appointments with dates corresponding to the date selected in the header.

View 3 Replies View Related

Add Multiple Record Quickly (details Inside, Void Where Prohibited)

Mar 27, 2008

Situation
My database stores course information for faculty in my department and prints out various reports based on that information.

The 2 mandatory fields in the form are [AcademicYear] and as they create the potential for classes to be added to the curriculum.

Question
Is there a way to add multiple records to the db based on the which year and instructor combinations were use prior?

[I]ex.
2007/2008, prof-a
2007/2008, prof-b
2007/2008, prof-c
2007/2008, prof-d

This represents the 2007/2008 school year where professors a through d taught courses. Is there a way to add records for another academic year so that:

2008/2009, prof-a
2008/2009, prof-b
2008/2009, prof-c
2008/2009, prof-d

appear with just the press of a button?

I don't know if I'm being clear enough. :p

View 1 Replies View Related

Queries :: List Of Dates And Records With No Matching Record OR Existing Record With Higher Date

Nov 24, 2014

I've been asked to get some information from my database and I'm a bit stuck.

I have a list of refunds in tbl_main and each one includes a dateReceived. I make a record in either tlk_located, tlk_unableToLocate or tlk_bulk depending on the outcome when we're trying to send the money back to whoever it belongs to. Each table has a time stamp (named locatedTime, unableTime and timestamp respectively) field

My manager wants me to report how many entries were unworked on each day in the year, and what the value of them was. An entry is unworked if there is no entry in either of the 3 tables.

So I need a query that lists a range of dates, and for each date counts the number of entries where tbl_main.dateReceived is <= to that date and either has no record in located,unable or bulk or has a record with a timestamp > than the date. (It has been processed now, but hadn't been on the date we are looking at)

I can manage a query that looks at a certain date that it prompts for on each run:

Code:
SELECT Count(tbl_main.trust2PK) AS CountOftrust2PK, Sum(tbl_main.amountRefunded) AS SumOfamountRefunded
FROM ((tbl_main LEFT JOIN tlk_located ON tbl_main.trust2PK = tlk_located.trust2FK) LEFT JOIN tlk_unableToLocate ON tbl_main.trust2PK = tlk_unableToLocate.trust2FK) LEFT JOIN tlk_bulk ON tbl_main.trust2PK = tlk_bulk.trust2FK
WHERE (((tbl_main.dateReceived)<=[cutoffDate]) AND ((tlk_located.locatedTime) Is Null Or (tlk_located.locatedTime)>[cutOffDate]) AND ((tlk_unableToLocate.unableTime) Is Null Or (tlk_unableToLocate.unableTime)>[cutOffDate]) AND ((tlk_bulk.timeStamp) Is Null Or (tlk_bulk.timeStamp)>[cutOffDate]));

I would like a query that lists all dates in a range, and shows the same information for each day listed.

View 9 Replies View Related

Forms :: Combo Box To Allow A User To Select Date And Relevant Work Details Appear In Subform

Jun 10, 2013

I have created a simple database, with 2 x tables. The first is a 'Week Ending' table, with a dateid key and Week Ending field. I have created several week-ending dates in order for a user to input details of work done the previous week. The second table contains the details of the work.

I have a one to many relationship between the dateid in the first table, and a dateid of the work details table.

I created a query based on the work details table, and created a subform from that. In a main form I linked a combo box to allow a user to select a date and the relevant work details appear in the subform. However the Week Ending field only shows one date, not a list of the dates I created.

View 7 Replies View Related

Queries :: One To Many Relationship Between Tables Containing Membership Details

Nov 25, 2014

I have a table with name, club members details ID etc. This is linked by a 1 to many link (ID) to a table containing details of membership subscription payments. One entry/row per membership period. This second table has DatePaid, Paid (Yes/No), Period. Period contains 2013-14, 2014-15 etc.

I can do a query for those that have Paid (Yes) but when I try one for those that have not Paid (No) or <>Yes I get no result. I only enter members when they have paid. I need a query to display those who have not paid for the 2014-15 period.

I can do it a long winded way copying 2 lists into Excel. One all members. One those who have paid. Then remove duplicates and those paid in 2013-14 leaves those not paid in 2014-15.

View 2 Replies View Related

Queries :: Auto Filling User Details

Nov 4, 2013

I have been managing a database system for a homeless shelter in my volunteer role. There is a certain feature that would improve accuracy of the inputted records, as well as freeing up time for staff. That is - auto filling a user's Gender and Nationality when inputting a record for the drop-in centre.

Currently, when a forename and surname is inputted in the "DropIn_Input" form, it is checked against the stored 'service users' table and checks for the name combination. If the name combination is not present then the forename and surname fields change to 'New'.

What I would like is to keep this, but if the service user name is stored in the 'Service User's table then I would like their Gender and Nationality to be automatically filled into the fields on the 'DropIn_Input' from the relevant information in the 'Service Users' table.

View 2 Replies View Related

Queries :: Hiding Records With Identical Address Details

Sep 11, 2013

I have written a simple query for address label printing purposes, but I do not want to print labels to identical postal addresses.This sounds such a simple requirement but my efforts to write a simple 'criteria' in the Address1 Field have been unsuccessful.

View 14 Replies View Related

Forms :: Display Donation Details In Datasheet View Of Fund And Amount For Selected Date / Donor

Oct 31, 2013

I have two related tables

1 Donor and
2 Donations with fields date, donor, fund and amount

I want a form to display donation details in datasheet view of fund and amount for a selected date and donor...

View 14 Replies View Related

Tables :: Making Single Field In A Table Containing All Details

Feb 24, 2013

I've inherited a data base which has the address details of our members spread across multi fields i.e. Add 1, Add2, Add 3, Post town, Post code etc.

Not all the fields contain information which means when I do a mail merge for address labels there are blank lines.

I would like to either be able to create a single field in the table (like a memo field for example) which contains all the address detail, or create a mail merge without blank lines.

View 3 Replies View Related

Queries :: Date Field With Time - Query For Date Only And Get All Records

Apr 26, 2013

I have a query based on a table which has a date field. the field both in the table and the query have the time also in the date value so when I try to query on a date I get nothing if I copy the date and time from the field I will get the result for that record if I just use the date I get nothing. I have tried the format which does display just date but if you click on the field the time is also there You must be able to query for a date only and get all the records.

View 11 Replies View Related

Queries :: Admission Details Of Patients Admitted To Hospital - Selecting Duplicate Records

Feb 3, 2014

I'll first of all explain the purpose of the query. I've built a database to record the admission details of patients admitted to hospital. Amongst other things, the database captures date/time of admission and date/time of discharge.

The query I am building needs to show patients with multiple admissions, and in particular, the number of days that have elapsed since they were last discharged. Within my query is the following subquery that I had written to show this aspect of it:

(SELECT TOP 1 Dupe.[Discharge Date]
FROM [Inpatient Database] AS Dupe
WHERE Dupe.[CHI Number] = [Inpatient Database].[CHI Number]
AND Dupe.[Discharge Date] <= [Inpatient Database].[Admission Date]) AS [Previous Discharge],

Note: "CHI Number" is a unique reference number assigned to every patient.

I then display in a column [Admission Date] - [Previous Discharge].

This works fine where a patient only has one previous admission. However, where a patient has multiple admission, the subquery always returns that patient's first discharge date instead of their most recent discharge date (because I have used the "TOP 1" predicate). It seems that it should be straightforward enough, however I can't seem to work around it. Anything I try results in errors, and so I keep defaulting back to my "TOP 1" solution.

i.e. What I want it to show is:
Name.......Admission Date...Discharge Date.... Previous Discharge... Days Between Admissions
Joe Bloggs ..01/01/2014 .......10/01/2014
Joe Bloggs ..15/01/2014 .......20/01/2014 .......10/01/2014 ..............5
Joe Bloggs ..27/01/2014 .......01/02/2014 ........20/01/2014 .............7

However, what it actually shows is:
Name ......Admission Date ...Discharge Date ...Previous Discharge ...Days Between Admissions
Joe Bloggs ..01/01/2014 ......10/01/2014
Joe Bloggs ..15/01/2014 ......20/01/2014 ........10/01/2014 .............5
Joe Bloggs ..27/01/2014 ......01/02/2014 ........10/01/2014 .............17

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved