Solved: Calculated Field in Query getting user input box

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

mariaa33

Thread Starter
Joined
Aug 7, 2008
Messages
164
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.
 
Joined
Jun 17, 2002
Messages
2,556
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])
 
Joined
Oct 20, 2004
Messages
7,837
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....)
 

mariaa33

Thread Starter
Joined
Aug 7, 2008
Messages
164
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.
 
Joined
Oct 20, 2004
Messages
7,837
I forgot to mention that you must show both a max field and a min field in the query as well - see attached.
 

Attachments

mariaa33

Thread Starter
Joined
Aug 7, 2008
Messages
164
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!!
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top