Jumat, 17 Juli 2020

Re: [MSAccessProfessionals] Access report, need to pass parameters to SQL Server back end

Thanks Duane, what's the fChangeSQL code?

On 07/17/2020 11:37 PM Duane Hookom <duanehookom@hotmail.com> wrote:


The User function that updates the SQL property of a saved query
strOldSQL = fChangeSQL("Instruments Query", strSQL)


Duane

From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of Giorgio Rovelli via groups.io <giorgio_rovelli=virgilio.it@groups.io>
Sent: Friday, July 17, 2020 4:23 PM
To: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>; Wei Qian via groups.io <wei_qian2001=yahoo.com@groups.io>
Subject: Re: [MSAccessProfessionals] Access report, need to pass parameters to SQL Server back end

So you've got strSQL but what do you do to change the query property?

On 07/17/2020 10:07 PM Wei Qian via groups.io <wei_qian2001=yahoo.com@groups.io> wrote:


Thanks, Crystal!  Actually, I just realized the parameter selection form is used by multiple reports, so I can't change the query and open report from the click of OK button on the form.  I guess I need to do it in the report.  The report's open event currently have a macro to open the parameter selection form, which is needed.  Now where should I put the code of changing query according to the parameter selection? "load" event?  Thanks very much!

Tidak ada komentar:

Posting Komentar