Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by MitchPitt

  1. MitchPitt

    Access query using Excel VBA

    Hey I figured out the problem. I don't understand why, but the material usage is actually another query I join to. It had criteria that used the "*" for wildcards. So since that did fire the query, then the criteria in the main query wouldn't work. Interesting situation. Thanks everyone for...
  2. MitchPitt

    Access query using Excel VBA

    Tried the '%' and it didn't work :( I can't understand the issues with the sql. here is a condensed version of my sql sql1 = "SELECT WOAM.workorder_number, WOAM.column_value, WOAM.task_number, MOAM.SERVICE_ORGANIZATION, MOAM.REASON_CHANGED, MOAM.SERIAL_NUMBER_REMOVED, MOAM.INVENTORY_ITEM...
  3. MitchPitt

    Access query using Excel VBA

    what the query has to do is find what are called workorders that are greater than a particular WO (They are Sequential) and only WOs that have the same 4 middle numbers.
  4. MitchPitt

    Access query using Excel VBA

    Yes it does for a couple of minutes since it's querying a datawarehouse.
  5. MitchPitt

    Access query using Excel VBA

    The recordcount message box gave me a count of zero
  6. MitchPitt

    Access query using Excel VBA

    OK. The query should only pick up only a handful of rows if any. The test parameters i'm using should create a single row coming back, but it's not. I've done this coding a millions times and i've never had a problem with a query expression where it would work in access and not in VBA
  7. MitchPitt

    Access query using Excel VBA

    Is there any limitations on recordsets with Access 97?
  8. MitchPitt

    Access query using Excel VBA

    The code never makes it past the while look since the recordset is considered at End of File
  9. MitchPitt

    Access query using Excel VBA

    Do While Not rstWOAM.EOF Sheet4.Range("c" & counter).Value = rstWOAM.Fields("workorder_number").Value Sheet4.Range("d" & counter).Value = rstWOAM.Fields("column_value").Value Sheet4.Range("e" & counter).Value = rstWOAM.Fields("task_number").Value Sheet4.Range("f"...
  10. MitchPitt

    Access query using Excel VBA

    xlbo, sorry, I didn't place that code after the Set rstWOAM = cnn1.Execute(sql1) code line. I have a while loop that places the recordset values in a spreadsheet. But the while loop fails, because it says there's nothing in the recordset.
  11. MitchPitt

    Access query using Excel VBA

    Quehay, took your advice about getting the SQL ouput. Pasted it into access the the sql worked fine. I just don't understand why nothing will come out of the recordset when it's placed into VBA.
  12. MitchPitt

    Access query using Excel VBA

    I am having a problem with a query I am trying to run in VBA. When I run the query, it will work with Access 97. But when I put the same SQL code into VBA, it will return nothing. I am baffled by this. Here is a piece of the code below. Some of the stuff was censored. Dim rstWOAM As...
  13. MitchPitt

    how to covert text field to number in Access SQL

    I am trying to convert a text field to a number field. We have a data warehouse, and the table in the warehouse stores number values as text (Why?! no clue!). How can i change the value type on the fly in an Access SQL query? I've tried the CDbl function since the values have 2 decimal place...
  14. MitchPitt

    Too few parameters. Expected 1 Error

    Figured it out, apparently Excel doesn't like sql queries with static fields placed in the query on the fly (ex. "hello" as Message).

Part and Inventory Search

Back
Top