S
Steve'o
SQL Server 2000 SP3a
Access 2000 SP3 (.adp)
I have form_a open, and I'd like to print preview the page the user is on
after they have finished editing it.
The form's recordsource is a sproc which selects data from a choice of views
which are created from another sproc fired on the onOpen of the form. The
problem is, I'd like to now apply a filter to the record source to print
preview it.
eg
form_a_onOpen =
Call CreateMyView_a ' creates a View with the users name in it, and a bunch
of options.
Me.InputParameters = "@TYPE varchar(25) = 'TEXT'"
Me.RecordSource = "sproc_b" ' used to select stuff back from the newly
created view.
Me.UniqueTable = "table_a"
sproc_a=
select *
from
view_created_by_CreateMyView_called_from_onOpen_of_form_it_is_datasource_for
where
field_a = @inputparam and
field_b = @Inputparam2
PrintPreviewMeButton_click on form_a =
dim intPage as integer
intPage=me.field1
DoCmd.OpenForm "frmName", acPreview, , "field1 = intpage"
As well as trying the where condition on the onOpen event I've tried the
OpenArgs, but the same thing happens, I get all the records from the sproc_a.
The filter makes no difference, I get ALL records on the print preview.
I've tried setting form_a datasource to be a normal view, and the filter
works fine, I can be editing record 10/100 and print preview record 10/100 by
clicking PrintPreviewMeButton
Does anyone know if this sounds right, that the filter will not work if the
recordsource of the form is a sproc set on the onOpen. Are there any other
options? Is the only other route to add another @InputParam to the sproc_a,
which will only really be used in this example? Or...
Thanks for any thoughts.
Access 2000 SP3 (.adp)
I have form_a open, and I'd like to print preview the page the user is on
after they have finished editing it.
The form's recordsource is a sproc which selects data from a choice of views
which are created from another sproc fired on the onOpen of the form. The
problem is, I'd like to now apply a filter to the record source to print
preview it.
eg
form_a_onOpen =
Call CreateMyView_a ' creates a View with the users name in it, and a bunch
of options.
Me.InputParameters = "@TYPE varchar(25) = 'TEXT'"
Me.RecordSource = "sproc_b" ' used to select stuff back from the newly
created view.
Me.UniqueTable = "table_a"
sproc_a=
select *
from
view_created_by_CreateMyView_called_from_onOpen_of_form_it_is_datasource_for
where
field_a = @inputparam and
field_b = @Inputparam2
PrintPreviewMeButton_click on form_a =
dim intPage as integer
intPage=me.field1
DoCmd.OpenForm "frmName", acPreview, , "field1 = intpage"
As well as trying the where condition on the onOpen event I've tried the
OpenArgs, but the same thing happens, I get all the records from the sproc_a.
The filter makes no difference, I get ALL records on the print preview.
I've tried setting form_a datasource to be a normal view, and the filter
works fine, I can be editing record 10/100 and print preview record 10/100 by
clicking PrintPreviewMeButton
Does anyone know if this sounds right, that the filter will not work if the
recordsource of the form is a sproc set on the onOpen. Are there any other
options? Is the only other route to add another @InputParam to the sproc_a,
which will only really be used in this example? Or...
Thanks for any thoughts.