multiple users - refresh form

A

amorrison2006

Hi there

I have a database which has a main form and sub form.

It's a very basic database but i have one main problem.

I have some users who will only be looking at the data in the database
on the form.

I would update the data but I do not know how to have this data
refresh automatically on the form of the users.

Perhaps I could have some sort of refresh code added in the main form?

This is my real issue,

I hope someone can help me,

Thanks so much,

Andrea
 
D

Douglas J. Steele

To refresh the data displayed on the form, you need to issue:

Me.Requery

To refresh the data displayed on the subform, you need to issue:

Me!NameOfSubformControl.Form.Requery

(Note that depending on how you added the form as a subform on the parent
form, the name of the subform control on the parent form may not be the same
as the name of the form being used as a subform)

You could either put a button on the form to run this command whenever they
want, or you could use the form's Timer to automatically refresh the form
after a fixed amount of time.
 
A

amorrison2006

Hi Doug

I got the refresh sub form to work no problem,

The only issue I have now is that when it does refresh it unfilters my
data.......

For example say from the combo box on my main form I select "clothes"
from the drop down list,

It will go straight back to the beginning of the list to say "books"
but not change the combo box. Therefore showing me the wrong data.

Is there a way I can also have it requery the data based on the combo
box being selected?

Thanks

Andrea
 
D

Douglas J. Steele

You'll have to keep track of what record it was on before the Requery, and
go back to that record.

Take a look at the Bookmark property in the Help file, or you could possibly
use the form's Filter property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top