Search results

  1. D

    SQL SUMs promblems

    Got it. Thanks guys! SELECT HOLDERS.CUSIP, SUM(HOLDERS.ORIGINAL_FACE) AS [400 ORIGINAL FACE], (SELECT SUM([300_HOLDERS].ORIGINAL_FACE) AS [300 ORIGINAL] FROM [300_HOLDERS] WHERE [300_HOLDERS].CUSIP = TEMP_HOLD.CUSIP) AS [300 ORIGINAL FACE] FROM HOLDERS INNER JOIN TEMP_HOLD ON TEMP_HOLD.CUSIP...
  2. D

    SQL SUMs promblems

    Plog you are correct. There are multiple entries on the 300_HOLDERS table and it is taking my HOLDERS value * (number of 300_HOLDERS entries). Any ideas on a sub query that can help me with this? I would really like to get all of this on one line, in one query. Think that's possible?
  3. D

    SQL SUMs promblems

    Hmm... didn't seem to work. I think you can only use the GROUP BY clause if you have a WHERE clause **edit** you can use GROUP BY without WHERE, but WHERE must come before GROUP BY
  4. D

    SQL SUMs promblems

    My SUMs are getting screwed up... If I do this I get the correct value: SELECT HOLDERS.CUSIP, Sum(HOLDERS.ORIGINAL_FACE) AS [ORIGINAL FACE] FROM HOLDERS INNER JOIN TEMP_HOLD ON TEMP_HOLD.CUSIP = HOLDERS.CUSIP WHERE HOLDERS.CUSIP IS NOT NULL GROUP BY HOLDERS.CUSIP ORDER BY HOLDERS.CUSIP But...
  5. D

    Query not running(/not doing what it's supposed to) using VBA

    Thanks JHB. You're right. I was covering up errors. Its getting hung up on a NULL in the primary key. Is there a way I can handle this error? Like turn the NULL value to a 0? On a side note, I'm getting a recordset not updateable for a UNION ALL query. Can I not run a UNION query through VBA...
  6. D

    Query not running(/not doing what it's supposed to) using VBA

    I have a section of code that I have running as soon as the db is opened. It is supposed to refresh the tables so that they are populated with the most current data. I keep having an issue with my JOIN queries not running correctly or if they do run correctly, not inserting the values pulled...
  7. D

    unlinked table look up

    Well now that is a neat tool! I don't have time to play with it right now but even if it doesn't fully work I will surely have a future use for that.
  8. D

    unlinked table look up

    Thanks for the response Dale. I was able to get the SQL to show the values in the combo box but after that I lost you. So now my problem is just how to filter for the first value that matches the name I select. Also, the combo box is displaying EMP_FNAME, the employee table is EMPLOYEE and...
  9. D

    unlinked table look up

    This is a stupid question I'm sure, but it may prove helpful to me. I have an unlinked subform on a form. This unlinked subform contains the contents of table: employee. What I want to do is have a textbox that, when typed in, will auto filter out records that don't match what was typed so that...
  10. D

    Data Entry Items only if previous has value

    Thanks Bob. I don't understand these at all but I will look into it some more and then see if I can't use this for what I want.
  11. D

    SELECT multiple sources, one is form textBox

    Thanks pbaldy!
  12. D

    SELECT multiple sources, one is form textBox

    I would like to reference multiple sources in my insert and I wonder if this is possible. I have probably set these tables up incorrectly since this doesn't work. Basically I have a Customer table that links to an address table by the AutoNumber CUS_NUM field which is primary key in both. I...
  13. D

    INSERT query using a Form text box

    I'm sure that this question has been asked before, but my google searches and forum searches weren't coming up with what I was looking for. I would like to add values to tables from values entered into text boxes on a Form using only sql, if possible. Can I reference a textbox name in SQL...
  14. D

    Data Entry Items only if previous has value

    I'm creating user form items (text boxes/combo boxes) for a user to enter data in. In this case it would be for a part. What I would like to happen is, if there is more than 1 part, then after the first part is entered, another part entry item is added below the first one but only if the first...
  15. D

    Sequential Optional Items on Form

    I'm creating user form items (text boxes/combo boxes) for a user to enter data in. In this case it would be for a part. What I would like to happen is, if there is more than 1 part, then after the first part is entered, another part entry item(s) are added below the first one. For a virtually...
  16. D

    stacking form entry stuff

    I should probably not lose hope so easily and just experiment a little more. select all layed out fields, go to layout, select remove layout and then start stacking!! Thanks plog!
  17. D

    stacking form entry stuff

    I am trying to make forms for my database class. What I have so far I am pleased with and would fulfill the project requirements just fine, however, I would like to add a little touch to really make the whole thing professional looking. There are two check boxes that are visible when you...
  18. D

    VBA SQL Help

    I'm expecting my table to be populated the same as it is when I run that same code in the SQL query format. Why is it any different from another query? I have delete query's executing? What's the difference between a SELECT and a DELETE? Point is I have a button that I push and then it will...
  19. D

    VBA SQL Help

    Ok, I tried this. Still no luck. Set rst = dbs.OpenRecordset("SELECT DISTINCTROW " _ & "Principal.Cusip, Interest.[Payable Date], Interest.Interest " _ & "Principal.Principal, Interest.Interest+Principal.Principal AS Total Into [DTC Amounts Paid] " _ & "From Interst INNER JOIN...
Back
Top Bottom