• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Access 2007 Query Hell *solved*

I am trying to run the below SQL, but when I do so, it is prompting me to enter values for both [Total Hours] and Goal. They are declared in the SELECT statement...so why is Access making me enter values??? I just want to display the results where one column is equal to or greater than another one.
 
I gave it a whirl, but it was still prompting me for "Goal" 😕

Access is such a POS...I should have done this in MySQL... Thanks for the shot though, keep trying...anything is better than what I have come up with so far and I've spent far too many hours trying to get this working.
 
I tried Vinyl's latest post, and the code ran without prompting me to enter anything, but is now posting the results of the query as if the WHERE wasn't in there (query returns all values instead of where they are equal or greater than). Also, KLin, I renamed the alias to "Goal1" instead of "Goal" in an effort to test your post, but didn't get any different results.
 
Remove the double quotes from the "Total Hours" alias and use square brackets. Add in a line after the group by line that says "having [Total Hours] >= Goal.[Goal-Target]" w/o double quotes.
 
Thanks for both of your help, I got it working. What I did was used that HAVING statement KLin provided and replaced [Total Hours] (because that wasn't working?) with Sum(Hours*24).

Thanks again 🙂

Jared
 
Back
Top