Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003

    Unanswered: Passing a Param value from Vba to an access Qry

    this is the vba code that executes the query, how can i pass a paramter that i define in VBA?

    DoCmd.OpenQuery stDocName, acNormal, acEdit

    dim qryPrm as string
    qryPrm = inputbox("Enter your prm Val")

    then send qryPrm to the docmd listed above.

    T~ M!

  2. #2
    Join Date
    Apr 2003
    Homer, Alaska
    The easiest way is to alter the query itself by adding [Enter your prm Val] to the Criteria of the field

  3. #3
    Join Date
    Oct 2003

    The param will come from a var in VBA

    The code in vba will assign a date to a variable

    dim lastDownLoad as date

    lastDownLoad =inputbox(yada yada yada)

    docmd.openqry lastdownload <-- some thing like this is what im looking for,, i have already set the paramater up in the querry


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts