Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 12th, 2006, 11:15 PM
Piter
Guest
 
Posts: n/a
Default Refresh of form

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

  #2  
Old March 13th, 2006, 10:55 AM
BillCo
Guest
 
Posts: n/a
Default 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

  #3  
Old March 13th, 2006, 05:25 PM
Piter
Guest
 
Posts: n/a
Default 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

  #4  
Old March 14th, 2006, 11:35 AM
BillCo
Guest
 
Posts: n/a
Default 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

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles