Search results

  1. C

    generate a table from a sql string VBA

    Perfectly valid argument. What will be created is a temporary table that is a necessary evil. I could create a query I suppose. Also an Excel spreadsheet would work, but I wanted to keep the data local (in the database) and not have to import it from a spreadsheet. What gets me is that I can...
  2. C

    Division by Zero?

    I'm trying to trouble-shoot an undocumented datbase built by someone else and running into a recurring problem. She has it set up where a macro runs several queries. When these macros are run, the queries cause "Division by Zero" errors which stops the macro in its tracks. The following is a...
  3. C

    generate a table from a sql string VBA

    Peter, Yes, that's exactly what I want. I apologize for not stating the original question more specifically. I am considering using the CreateTableDef method, but I'm waiting to see if there would be an easier way before I did all of that. I'll keep looking. Thanks for your help.
  4. C

    generate a table from a sql string VBA

    Bat17, A couple of things... Does the strQuery and strName need to be the name of an actual table and a query that already exist in the database? Because I would need to define the query and specify the table name through VB at the time the code is run. Also the query that I'm running is a...
  5. C

    generate a table from a sql string VBA

    Bat17, I've had a chance to look into this and the way the question is posed, your reply makes sense. Thanks. It seems I'm looking for something different, though. What I need is to make a table that is a copy of the resultset returned by the query which is different from actually copying...
  6. C

    problem with for loop

    Usually this error means that you have referenced a field name that is misspelled or doesn't exist. Either your sql statement has an error or your field names are misspelled or don't exist in the recordset you've created. Set a breakpoint at the beginning of the code and step through the code...
  7. C

    generate a table from a sql string VBA

    generate a table from a sql string VBA/DAO Is there a way in VBA/DAO to create a table off of a query. I would like to reference a query and generate a table that's a direct copy of the data in the query. The ideal would be if a query could be selected and a table name could be generated...
  8. C

    Two Subqueries in one statement

    Unfortunately for me, my weeks aren't as short and my time's not as valuable. I'm getting back into database development after a long hiatus. Things are going as slowly as I remember them. Actually, I've been working on this query for about two weeks. A week to figure out the query and another...
  9. C

    Two Subqueries in one statement

    Success!!! I removed the second period and put the entire thing in parantheses as you suggested and it worked. After working on this query for over a week, now I can continue my project . That's going to help me out a ton! Thanks a million.
  10. C

    Two Subqueries in one statement

    mresann, Thanks for your reply, but I still get the error. The syntax is unfamiliar to me while the (.AS qryOne) does have the period and it works properly and that's why I put it in (.AS qryTwo), but I really don't know what it's for. Any other ideas?
  11. C

    Two Subqueries in one statement

    How many subqueries can I put into one SQL statement? I'm trying to run a query that has two subqueries, but it's not working. It works when I create and reference one of the queries separately, but when I put them directly into the statement as subqueries, it gives me a syntax error. It would...
  12. C

    only pull the newest date from a table

    EMP and Jon K, I've tried this and it works how it needs to. I appreciate all of your help getting this going. Thanks a hundred for your assistance.
  13. C

    only pull the newest date from a table

    EMP, Thanks for the reply. The data is not normalized because it tracks the history of changes made to information and other things. It may seem naive, but I've done several "normalized" databases and that's not what I'm seeking here. I'm just interested in getting the query working.
  14. C

    only pull the newest date from a table

    EMP, Here's a sample of the database. qryEntityTest is similar to the query I've posted. If you look at the table tblEntityDetail, shows all the dates and values. I simply would like the latest value to show up in the query results. Any help you can offer will be greatly appreciated. Thanks. Paul
  15. C

    only pull the newest date from a table

    Jon K, Thanks for responding. I would like to "tweak" the crosstab query that I submitted to get the results. I'm pulling header names from another table so I need to use the TRANSFORM option. The query gives me the latest fldDate, but not the fldValue in the same record. I think that the...
  16. C

    only pull the newest date from a table

    If I read this post right, I'm trying to do the same thing; I would like to show the latest value entered for each particular ID, disregarding the records that have an earlier date. So if records show: fldEntityID fldValue fldDate 1 Amy 6.30.05 1 Ami 7.1.05...
  17. C

    Listing data rows as coulmns

    I'm unfamiliar with crosstab queries, but I'll check it out. Thanks for the tip.
  18. C

    Calculate mulitple dates listbox from a single date

    I'll give that a try. Thanks raskew.
  19. C

    Listing data rows as coulmns

    Hello all, I have a crazy question. Is there a way to write a query that would display data rows with common ID's as if they were columns in a query? It's for visually representing row data as if they were one record in a list. Basically, I would like to take the following data... fldID...
  20. C

    Calculate mulitple dates listbox from a single date

    Pat, I get it. Use the listbox's list option and add items to the list. That makes sense. I was thinking that a query could do this, but that's alright. I think I've seen an example to do this. No article neccessary. Thanks for your help.
Back
Top Bottom