Change Query Parameters

Please support our MS Access and FileMaker Pro advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Mar 2005
Posts: 1
Reputation: motid7 is an unknown quantity at this point 
Solved Threads: 0
motid7 motid7 is offline Offline
Newbie Poster

Change Query Parameters

 
0
  #1
Mar 14th, 2005
I change query parameters in my code.

i want the query to change her Sql property to new sql with new parameters.


Set QueryDef = CurrentDb.QueryDefs("q_QueryName")

QueryDef.Parameters("[Param_1]") = stringvalue_1
QueryDef.Parameters("[Param_2]") = stringvalue_2
QueryDef.Parameters("[Param_3]") = stringvalue_3
QueryDef.Parameters("[Param_4]") = "#" & Format(timevalue_1, "HH:mm") & "#"
QueryDef.Parameters("[Param_5]") = "#" & Format(timevalue_1, "HH:mm") & "#"

QueryDef.Parameters.Refresh

'QueryDef.Sql

DoCmd.OpenReport "r_ReportName", acViewPreview

The report "r_ReportName" need to run with new Query and new parameters.
But, actually the Query.Sql didn't change at all.
and microsoft JET still ask me for enter parameters ??
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC