Data REport

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Re: Data REport

Post by Johann »

Another problem. When the date and time are saved in the access. It is only ######## -_-
Student here.
Johann/Yuwan

User avatar
HansV
Administrator
Posts: 78642
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Data REport

Post by HansV »

What happens if you make the LastModified column in the passenger table wider?
Best wishes,
Hans

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Re: Data REport

Post by Johann »

Yeah. There it is. Problem is. When I changed the connection of the data report, the Fname doesn't show. -_-
Student here.
Johann/Yuwan

User avatar
HansV
Administrator
Posts: 78642
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Data REport

Post by HansV »

Did you include FName etc. in passengerquery?
Best wishes,
Hans

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Re: Data REport

Post by Johann »

Yes. and put the (SELECT Max(LastModified) FROM passenger) in its criteria
Student here.
Johann/Yuwan

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Re: Data REport

Post by Johann »

Under the properties of Passenger in Data Report

Database Object = View
Object Name = PassengerQ (name of the query)

Am I Correct?
Student here.
Johann/Yuwan

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Re: Data REport

Post by Johann »

Hey?
Student here.
Johann/Yuwan

User avatar
HansV
Administrator
Posts: 78642
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Data REport

Post by HansV »

I'm not a robot - I can't be online 24 hours a day!

Yes, that looks correct.
Best wishes,
Hans

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Re: Data REport

Post by Johann »

I'm sorry. Buty you're the only reliable and the only one who replies in my every post. :)). Sorry
Student here.
Johann/Yuwan

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Re: Data REport

Post by Johann »

The records in the table are not visible in the table of the query. I think that is the problem. That's why the output is blank
Student here.
Johann/Yuwan

User avatar
HansV
Administrator
Posts: 78642
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Data REport

Post by HansV »

The code to fill the LastModified field will only work for new records created from now on. It will be empty for records created before you added the code.
If you create a new record using your form, that record should be returned by the query.
Best wishes,
Hans

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Re: Data REport

Post by Johann »

Have tried several times. but still empty. T_T
Student here.
Johann/Yuwan

User avatar
HansV
Administrator
Posts: 78642
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Data REport

Post by HansV »

Please open the query in design view (in Access), then switch to SQL view.
Copy the SQL text of the query, and paste it into a reply here.
Best wishes,
Hans

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Re: Data REport

Post by Johann »

SELECT passenger.Fname, passenger.Lname, passenger.Mname, passenger.Senior, passenger.Adults, passenger.Kids, passenger.Address, passenger.Contact, passenger.LastModified, passenger.Balance
FROM passenger
WHERE (((passenger.Fname)=(SELECT Max(LastModified) FROM passenger)) AND ((passenger.Lname)=(SELECT Max(LastModified) FROM passenger)) AND ((passenger.Mname)=(SELECT Max(LastModified) FROM passenger)) AND ((passenger.Senior)=(SELECT Max(LastModified) FROM passenger)) AND ((passenger.Adults)=(SELECT Max(LastModified) FROM passenger)) AND ((passenger.Kids)=(SELECT Max(LastModified) FROM passenger)) AND ((passenger.Address)=(SELECT Max(LastModified) FROM passenger)) AND ((passenger.Contact)=(SELECT Max(LastModified) FROM passenger)) AND ((passenger.LastModified)=(SELECT Max(LastModified) FROM passenger)) AND ((passenger.Balance)=(SELECT Max(LastModified) FROM passenger)));
Student here.
Johann/Yuwan

User avatar
HansV
Administrator
Posts: 78642
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Data REport

Post by HansV »

Thanks! The condition should be ONLY on the LastModified field:

SELECT passenger.Fname, passenger.Lname, passenger.Mname, passenger.Senior, passenger.Adults, passenger.Kids, passenger.Address, passenger.Contact, passenger.LastModified, passenger.Balance
FROM passenger
WHERE (((passenger.LastModified)=(SELECT Max(LastModified) FROM passenger)));

You can also use

SELECT passenger.*
FROM passenger
WHERE (((passenger.LastModified)=(SELECT Max(LastModified) FROM passenger)));
Best wishes,
Hans

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Re: Data REport

Post by Johann »

My Goodness! Thank you! =D. It worked! So gratefule. Thank you very very very much. :D
Student here.
Johann/Yuwan

User avatar
HansV
Administrator
Posts: 78642
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Data REport

Post by HansV »

You're welcome! Good luck with the continuation of your project.
Best wishes,
Hans