By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,679 Members | 2,749 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,679 IT Pros & Developers. It's quick & easy.

Refresh of form

P: n/a

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


Mar 12 '06 #1
Share this Question
Share on Google+
3 Replies

P: n/a
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"
end function

....will do the job nicely

Mar 13 '06 #2

P: n/a
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.

Mar 13 '06 #3

P: n/a
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"

Mar 14 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.