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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: bab
  • Order by date
  1. bab

    Modifying pass-through query from VBA

    I think what you need is pretty straightforward: Dim sSQL As String Dim dbs As Database Dim qdf As QueryDef sSQL = "SELECT * FROM table_2" Set dbs = CurrentDb Set qdf = dbs.QueryDefs("qryTable") With qdf .SQL = sSQL .Close...
  2. bab

    Using VBA to delete specific records from a table.

    I only noticed that in your sql statement below: strSQL = "DELETE tblChosenOnes.ChosenOnes* FROM tblChosenOnes WHERE (((tblChosenOnes.ChosenOnes)=(" & strCriteria & ")" that you forgot the single quotes that have to go around strCriteria, as in: =('" & strCriteria &...
  3. bab

    using VBA with SQL

    I hope this is helpful: Dim strSQL as String Dim MyVar as String MyVar = "Fred" 'or however else you set it strSQL = "DELETE tblChosenOnes.ChosenOnes FROM tblChosenOnes WHERE (((tblChosenOnes.ChosenOnes)='" & MyVar & "'));"
  4. bab

    sending query results to table in MS Word document

    I'm having trouble sending a set of query results to MS Word. I open Word and add a document, send text ok, now I want to send the results of a query and can't get that to work. I tried and failed to get the syntax correct for the insertdatabase method. I've tried things like: With wDoc...

Part and Inventory Search

Back
Top