E
Elle Short via .NET 247
Hello All, any help would be appreciated:
I am trying to pass a parameter to an Access Report. Just runningthe report from .net with no parameter in my access query and nowherecondition clause in my .net ...report prints correctly.
As soon as I add the parameter to my Access query, and thewherecondition to my .net....the .Net form pop's up a parameterbox for the user to enter the parameter. That's not what I want,I want to pass the text field automatically. I'm thinking it'sa syntax thing, but am having no luck finding an example:
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click
Me.txtUKey.Text = 112 'just a test number to pass
Dim oAccess As Access.Application
oAccess = New Access.ApplicationClass()
oAccess.OpenCurrentDatabase(filepath:="c:\Inetpub\wwwroot\tribalastprgs\AstPrgData.mdb", exclusive:=False)
oAccess.DoCmd.OpenReport(ReportName:="HCSPRpt",View:=Access.AcView.acViewNormal, _
wherecondition:="[ukey]=" & Me.txtUKey.Text)
Thanks!! I appreciate any help you send my way. Elle
I am trying to pass a parameter to an Access Report. Just runningthe report from .net with no parameter in my access query and nowherecondition clause in my .net ...report prints correctly.
As soon as I add the parameter to my Access query, and thewherecondition to my .net....the .Net form pop's up a parameterbox for the user to enter the parameter. That's not what I want,I want to pass the text field automatically. I'm thinking it'sa syntax thing, but am having no luck finding an example:
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click
Me.txtUKey.Text = 112 'just a test number to pass
Dim oAccess As Access.Application
oAccess = New Access.ApplicationClass()
oAccess.OpenCurrentDatabase(filepath:="c:\Inetpub\wwwroot\tribalastprgs\AstPrgData.mdb", exclusive:=False)
oAccess.DoCmd.OpenReport(ReportName:="HCSPRpt",View:=Access.AcView.acViewNormal, _
wherecondition:="[ukey]=" & Me.txtUKey.Text)
Thanks!! I appreciate any help you send my way. Elle