Tech Support Guy banner
Status
Not open for further replies.
1 - 7 of 7 Posts

·
Registered
Joined
·
164 Posts
Discussion Starter · #1 ·
I have a query that has event date (Event_Start) where I use total min and max to get the first event (First Event: Event_Start with Min selected in the total row) and last event (Last Event: Event_Start with Max selected in the total row). When I use another column to calculate the # of Days between these 2 expressions (Days Between: [First Event]-[Last Event]), I get a pop up boxes that ask for First Event and Last Event. I can just hit enter on both and still get the calculation in the "Days Between" field in the query. How do I get rid of the pop up boxes when I run the query.
 

·
Registered
Joined
·
2,556 Posts
check the spelling of the field you see popping up, also look in any preceding queries ( if any)

this does not look right... (Days Between: [First Event]-[Last Event])

s/b... Days Between: ([First Event]-[Last Event])
 

·
Registered
Joined
·
7,837 Posts
In your query, enter this as an expression:
Expr1: ([MaxOfEvent_Start]-[MinOfEvent_Start])
Then enter this as the format for that field
h:nn;@
(don't ask me why nn rather than mm - enter mm and Access changes it....)
 

·
Registered
Joined
·
164 Posts
Discussion Starter · #4 ·
I tried both of your suggestions and both still pop up a parameter input box. The second option does not even give me the calculation. I verified my spelling is correct and even use the builder to make sure I entered it correctly.
 

·
Registered
Joined
·
164 Posts
Discussion Starter · #6 ·
Thanks for the example. I am such a dummy!!!!. When I looked at your query I realized my error - I forgot to change field from Group By to Expression. Works perfectly. Sorry for the dumb error!!
 
1 - 7 of 7 Posts
Status
Not open for further replies.
Top