PHV, you're a pro. Thank you very much! I have to double check the rest of my queries to make sure I'm getting the right values, but I got 300.7!
Have a star... again. =)
For example, in queryC, for 2004 50 G/S Armatures SUM, considering the data above, it would be 38+262.7 -> 300.7
Do I want to use a UNION, then? Thanks, PHV.
Note: QueryA and QueryB are each dependant upon one different query.
QUERYA:
SELECT [qryP2-Dol-1].Year, Sum([qryP2-Dol-1].Dol) AS SumOfDol, [qryP2-Dol-1].CreditSection
FROM [qryP2-Dol-1]
GROUP BY [qryP2-Dol-1].Year, [qryP2-Dol-1].CreditSection;
QUERYB:
SELECT [qryP2-Dol-2].[Year]...
Hey everyone,
I'm having trouble with my select queries. I have two queries - each with dollar values sorted by year and creditsection. I have another select query trying to add them together, but instead it adds every value to every value rather than adding queryA's 2004's credit section to...
Dynamic SQL... build an event on your "Submit" button.
It involves:
First, set a string variable strSQL equal to the correct SQL.
Then, CurrentDb.QueryDefs("QueryName").SQL = strSQL
If you can't get it, paste your SQL code and I can show you specifically.
Hey all,
Here's my newest problem...
I have a query (qryP1Pound) pulling data from two tables: FailureHub and SalvageHub. I want the query to count entries in two timelines (2005/2004) in both tables, then subtract the two counts to give me total un-salvageable failures in each year.
After...
But I'm not subtracting values... I'm subtracting Count of one table from the Count of another. So if I put both fields in one query, they won't correlate. If I count them and subtract, that brings the query to one row, which eliminates the date data. What am I missing?
Thanks for your help...
I've tried that, but I don't think I can get around it because my WHERE statement includes an OR value (I'm looking at data range in 2005 and 2004, for example). Therefore, I need to keep the dates, which I can't do if I count the data in the first query... I have to split it up in the crosstab...
Hello all,
I'm having a little trouble getting my queries to work for creating a graph in a report. If anyone can point me in the right direction, I'd really appreciate it. Here's my scenario:
I have a form that inputs dates for the data to be graphed (I can get this part to work). The query...
The listbox is showing the right values and giving me the right bound number now - I'm also able to add the values to the Intermediate table, but I'm having trouble deleting entries. I'm getting the right values but I think my SQL is wrong. The code is listed above but I'll list it again...
Aha! My RowSource was incorrect. It was a SELECT statment instead of just referring to the query.
Thanks for your help, everyone! Hopefully I can get this to work now. =)
That's why I'm so confused... I have the bound column as 1 (the ID field), and it's still displaying the values for column 2 (the name field). I'll keep tinkering with it.
lst1 and lst2 are not multi-select.
Here's my code:
Private Sub butInclude_Click()
'This button adds data to the Intermediate table
'Check to make sure data is entered
If lst1.ListIndex = -1 Then
MsgBox "Please select a failure."
Exit Sub
End If
Stop
'Open Hidden Form
DoCmd.OpenForm...
Hmm I tried that, earth, but it's coming up with no values in the list... it's like they are there (I can click on them and scroll down - so there's the right number), but it doesn't show any of the names. When I use Stop and check the value, it's the string (column 2). This is really bizarre...
frmModify is the form everything resides on (Me).
I think I may have found the problem... my bound lists aren't displaying the correct values when I use the Stop command. They're giving me either Null or the string instead of returning the number like I want them to.
The query has ID as the...
Hmm I went with the first method and it's giving me a runtime error 424, object required error. This is when I click the remove button and it highlights the strWHERE statement. Any suggestions?
Thanks for your help, Ken.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.