DMin in textBox problem

G

gator

I'm just trying to get the earliest Date from a query and nothing I do is
getting it.

This is as close as I can get to what I want...
=(Format(DMin("TranDate","mmmm yyyy")),"Transactions200902DetailQuery")

can someone help me get the right syntax?
 
M

Marshall Barton

gator said:
I'm just trying to get the earliest Date from a query and nothing I do is
getting it.

This is as close as I can get to what I want...
=(Format(DMin("TranDate","mmmm yyyy")),"Transactions200902DetailQuery")

can someone help me get the right syntax?


=Format(DMin("TranDate","Transactions200902DetailQuery"),"mmmm
yyyy")

If that query is used as the report's record source, it
should be easier to use the Min function:
=Min(TranDate)

Either way, put the mmmm yyyy in the text box's Format
property instead of using the Format function.
 
G

gator

it's telling me invalid syntax for the following...
=Format(DMin("TranDate","Transactions200902DetailQuery"),"mmmm yyyy")
 
M

Marshall Barton

gator said:
it's telling me invalid syntax for the following...
=Format(DMin("TranDate","Transactions200902DetailQuery"),"mmmm yyyy")


I don't see a syntax error in there. Do you have any other
clues?

Are you sure the error is coming from that text box?
 
G

gator

I am basing the report on Query2 which is a Totals query from Query1.
TranDate is a field in Query1 but not Query2(which is what the report is on).
So there is no TranDate field directly tied to the Report. But, I'm still
getting the syntax error....something about maybe an operand without an
operator?
 

Ask a Question

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.

Ask a Question

Top