Auto Refresh

W

weircolin

Hi there

I have a form and a sub form. The main form is used to add an event
to a table and the subform has a combo box that allows the user to
select and event from the table.

When I enter a new event into the form, it doesn't show in the subform
until I close it and then open it again. Is there anyway I can get it
to do this automatically, save button or something?

Cheers

Colin
 
R

ruralguy via AccessMonster.com

If Me.Dirty Then Me.Dirty = False
...will save the current record.
 
M

Maverick

You need to add code to refresh the combobox on the subform. If you place the
following code (replacing YourSubformName and ComboboxName with the
appropriate names) in the AfterUpdate event of the control on your form, it
should work:

Forms!YourSubformName.ComboboxName.Requery

If requery doesn't work, try refresh.
 
M

Maverick

Happy to help.

By the way, Allan is way better at this stuff than I am. He has taught me
much of what I know. His way may provide you with a better result in the long
run.
 
R

ruralguy via AccessMonster.com

Post back if you are still having problems. Thanks for the plug Maverick.
 
M

Maverick

You deserve the plug. Not only do you know your stuff, but you are so willing
to help others. I think that is awesome!

It's funny... the two Access gurus I rely on the most are Allan (Bunch) and
Allen (Browne). Is there a running theme here?
 
M

Maverick

Colin,

Please mark the answer that solved your problem as helpful so that others
know that your post was resolved.

Thanks.
 

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