Recent content by madel

  1. M

    Trouble with sql syntax in vba

    I don't see a HAVING in the code submitted above. One tip. Remove all excess code and test with the smallest amount of code. (Then gradually add back in a line or so at a time.) Preferably only enough to fit on one line so you don't have too many concatenation issues. Sub x() Dim strSQL...
  2. M

    acExport and a RowCount with one query

    I feel like one of the blind men trying to describe an elephant. I‘ve taken great bits of code (some from this site) to get pieces of what I need, but I’ve created a monster instead of an elephant. The code needs to do ALL of the following: 1) Export memo fields that are greater than...
  3. M

    rs.RecordCount returns 1 s/b 1,007

    took too long to post my question. I see that JANR has already posted the answer. thanks to all. mike
  4. M

    rs.RecordCount returns 1 s/b 1,007

    Dohh!!!! So.... I just changed the code to "SELECT Area as Count FROM tblAreas;" and got 16 Can I get the value of the 1 record from the original SQL? Select Count(*)....." If so, is there a benefit of doing it one way or the other?
  5. M

    rs.RecordCount returns 1 s/b 1,007

    Here is much simpler version of the code. That, unfortunately, also return 1. note: TblAreas has 16 entries (see below). Sub Test() Debug.Print "Start: "; Now() Dim db As DAO.Database Dim rs As DAO.Recordset Dim rsCount As Integer Dim queryNameOrSQL As String queryNameOrSQL = "SELECT...
  6. M

    rs.RecordCount returns 1 s/b 1,007

    Not linked. They were imported into Access. I might understand getting no result - if the query didn't work. But I can't figure out why I'm getting a 1. I'll experiment some more.
  7. M

    rs.RecordCount returns 1 s/b 1,007

    Bob. I tried your suggestion and still got 1. I did mention that I copied and pasted the code from the Immediate Window into MS Access. (Debug.Print queryNameOrSQL) Ran the resolved code and got 1,007. So the code with double quotes should be okay. However, it is a bit easier to read...
  8. M

    rs.RecordCount returns 1 s/b 1,007

    This is hopefully a simple error. I run this code and get 1 record from Debug.Print rsCount When I run the query I get 1,007 (I copied the output of "Debug.Print queryNameOrSQL" from the immediate window - so I run the same code.) note: I commenting out "rs.MoveLast" but still got 1...
  9. M

    Hello from the Left Coast USA

    I've lived in the San Francisco Bay area for 30 years. Married with 2 kids. Most of my adult life I've been doing computer work of one type or another. I am a Senior Database Analyst using MS Access 2003 and Crystal Reports 11. (In a past life I used Oracle.) I do lots of queries that...
Top Bottom