a 'Refresh'ing question

C

cinnie

hello
VBA Help (I have Access 2002) says that a form's Current Event is triggered
when the form is Requeried or Refreshed, or the focus moves to a new recored
making it the current record. I have a question about the 'Refresh' part of
that statement.

In one of my combobox's AfterUpdate event I have code "Me.Refresh". Here's
my question. When I'm stepping through the code and the combo's AfterUpdate
code is run, the form's Current event is NOT triggered. Why? Is the Help
message wrong? (when I use "Me.Requery", the Current event is triggered.)
 
J

Jack Leach

"Refresh" doesn't actually requery the underlying recordset, it just
refreshes data that may have been changed by another user. Requery actually
runs the query again... I would guess this is why a Requery will trigger the
Current event, but Refresh won't.

The VBA help file for both Refresh and Requery might give a better
understanding (if not exactly why Current runs on one and not the other, it
will at least give the differences between the two).

hth
--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
C

cinnie

Hi Jack
Thank you for responding. I was actually aware of the difference between
Requery and Refresh, but I was just wondering why VBA Help says Form_Current
is called after a Refresh when that doesn't appear to be true.
 

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