Search results

  1. J

    Using variables in SQL statements

    Paul Tutorial was interesting but it raised 3 issues: 1. in your example in the tutorial on strings your syntax is different from that which you sent me. What you sent works but if I mimic what you have in the tutorial then it throws an error 2. If I want to add in my AND (see my original...
  2. J

    Using variables in SQL statements

    Bada Bing! works perfect with inputbox or combo. Can you explain how the (') and (") were selected i.e. how to syntax the variable like you did to make it work in the sql statement. explain the quotes (") and single notches (') thanks, jeff
  3. J

    Using variables in SQL statements

    if I use the syntax you provided I get a compile error: Expected end of statement. since I have dropped the AND in the SQL statement I don't need the 3rd set of parens. Let's make it even simpler, drop the comboBox and just get the value directly from the user: plantLoc = InputBox("enter...
  4. J

    Using variables in SQL statements

    Paul, I can't get the syntax right - either get an error message or the code executes but skips over my Do Loop. Here is what I have for code that runs but skips the Do Loop: strSQL = "SELECT" * FROM prices " & "WHERE(prices.Plant_ID) = '& Me.Combo1.Selected'" qrydf.SQL = strSQL Set...
  5. J

    Using variables in SQL statements

    I will give it a try. BTW, our distribution center in New Jersey is on John Galt Way (some civic planner with a taste for Ayn Rand I suppose) Jeff
  6. J

    Using variables in SQL statements

    Need to use a variable (that takes its value from combo box) in SQL statement in VBA. Not sure how this is done. Neophyte so give me simple step wise instructions without programmer speak. Example is good as long as it is annotated. SQL looks like this: propSQL = "SELECT * FROM prices " &...
Back
Top Bottom