Connecting Tech Pros Worldwide Help | Site Map

Refresh of form

Piter
Guest
 
Posts: n/a
#1: Mar 12 '06
Hi

I have a form with source of data on query "qrymultiselect"
On this form I have a multiselect list and a button "filter"
With click a button there is a procedure that is creating query
"qrymultiselect" with criteria from my multiselect.
After that I would like to refresh my form so that to get a data from
my new query "qrymultiselect" that I created with my procedure.
I tried forms!frmMyform.requery and me.requery but it doesnt work.
How to make a form to refresh a date from my new query that I created?
Thanks for any help

Piter

BillCo
Guest
 
Posts: n/a
#2: Mar 13 '06

re: Refresh of form


access glitch! it holds the info in the last created "qrymultiselect"
in cache. when you requery it, it doesnt re-read the query, but rather
it uses the query it remembers to re-scan the data. so what you need to
do is re-set the control source of the list.

function updateList()
're-create query stuff
me.lstName.ControlSource = "qrymultiselect"
me.lstName.Requery
end function

....will do the job nicely

Piter
Guest
 
Posts: n/a
#3: Mar 13 '06

re: Refresh of form


I think you right access glitch and doesnt re-read the query but I dont
want to refresh data of my list (the data of my list is ok and have
another source than form) What I want is to re-set data of my form
(this is continuous form) and query "qrymultiselect" is the source of
my form not of my list. Maybe this is not fortunate name for the source
of form and can cause misunderstanding. Sorry for that.Thanks anyway
for trying to help.
Piter

BillCo
Guest
 
Posts: n/a
#4: Mar 14 '06

re: Refresh of form


unfortunite naming indeed!
I'm going to go out on a limb and say that it's probably the same
principle at work here - that you need to re-set in code the
recordsource of the form and then requery the form.

me.recordsource = "qrymultiselect"
me.requery

Closed Thread