H
Harold via AccessMonster.com
Can I make a query to find info only from the last record entered? I need to
use that record in an expression.
Thanks
Harold
use that record in an expression.
Thanks
Harold
PC said:If you have an autonumber for the primary key, the last record entered will
have the largest value for the primary key and you can use the DMax
function.
PC said:This post and your original post seem to conflict! Oroginally, you said
"find info only from the last record entered". Here you say you want to
apply the expression to the last record in the form". Please clarify.
[quoted text clipped - 5 lines]This is what Im doing :
=[tblSIP Subform].[Form]![InspectionDate]+(365*3)Thanks
Harold
Harold via AccessMonster.com said:Sorry,
What I want to do is find the last record entered, and then add 3 years to
a
field in that record.
I think I can somehow get the record with the highest autonumber (primary
key)
and then add an expresion to a date field in that record. What Im tring to
do
is, I have a table where I put in inspection dates, I need to add three
years
on to whatever the last inspection date was to come up with a inspection
date
for next time.
Sorry, Its hard to explain.
Thanks
Harold
PC said:This post and your original post seem to conflict! Oroginally, you said
"find info only from the last record entered". Here you say you want to
apply the expression to the last record in the form". Please clarify.
[quoted text clipped - 5 lines]This is what Im doing :
=[tblSIP Subform].[Form]![InspectionDate]+(365*3)Thanks
Harold
Harold via AccessMonster.com said:Sorry,
What I want to do is find the last record entered, and then add 3 years to
a
field in that record.
I think I can somehow get the record with the highest autonumber (primary
key)
and then add an expresion to a date field in that record. What Im tring to
do
is, I have a table where I put in inspection dates, I need to add three
years
on to whatever the last inspection date was to come up with a inspection
date
for next time.
Sorry, Its hard to explain.
Thanks
Harold
PC said:This post and your original post seem to conflict! Oroginally, you said
"find info only from the last record entered". Here you say you want to
apply the expression to the last record in the form". Please clarify.
[quoted text clipped - 5 lines]This is what Im doing :
=[tblSIP Subform].[Form]![InspectionDate]+(365*3)Thanks
Harold
PC said:The dates you tried, were they after at least one of the
NextInspectionDueDates?
Check the criteria, did you use square brackets and not parantheses?
Try a shorter criteria:
<= [Enter A Date]
Remove the criteria and run your query and check out:
1. Are the dates in the InspectionDate field the last inspection dates?
2. Do you have dates in the NextInspectionDueDate? Are they all 3 years
later than the dates in the InspectionDate field?
[quoted text clipped - 6 lines]Thanks,
That worked great! , untill I got to the part where I put this; <=[Enter AHarold
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.