>I don't think so. Let me try to explain it again.
>
[quoted text clipped - 60 lines]
>> > Thanks,
>> > Steve
I tried that, but it doesn't work. I think it is becasue the form is not
display data directly from the table, but from a query which is combining and
calculating the various fields, so the "refresh" doesn't work. ReQuery will,
but it prompts the user, so I was looking for a way to supply the parameter
that the user already supplied and do a ReQuery.
Steve
> Hi,
>
[quoted text clipped - 72 lines]
> >> > Thanks,
> >> > Steve
Michel Walsh - 26 Jul 2006 22:54 GMT
Hi,
If you have your hands on the value of the parameter, then:
Option Compare Database
Option Explicit
Dim qdf As QueryDef
Dim rst As DAO.Recordset
Private Sub Command2_Click()
Set qdf = CurrentDb.QueryDefs("MyQuery")
qdf.Parameters(0) = 2 '<---- the parameter
Set rst = qdf.OpenRecordset(dbOpenDynaset)
Set Me.Recordset = rst
End Sub
To get the values of the parameter(s), someone can include them in the
SELECT list:
SELECT f1, f2, f3, param1
FROM myTable
WHERE f5>= param1
and thus, they will be in the recordset of the form that has been open on
the said query.
Hoping it may help,
Vanderghast, Access MVP
>I tried that, but it doesn't work. I think it is becasue the form is not
> display data directly from the table, but from a query which is combining
[quoted text clipped - 91 lines]
>> >> > Thanks,
>> >> > Steve
Steve Haack - 27 Jul 2006 01:12 GMT
That's exactly what I was looking for.
Thanks a bunch.
Steve
> Hi,
>
[quoted text clipped - 121 lines]
> >> >> > Thanks,
> >> >> > Steve