On Form Refresh?

F

FBxiii

Hi. I am wondering if it is possible to 'trap' a F9 key refresh on a form?
I dont necesarily need the form's recordset to refresh but there are a few
text-boxes populated by a query (after a combo box is updated) that I would
like to refresh the values in. I could go down the line of putting a refresh
button on the form if it is not possible...

Cheers,
Steve.
 
A

Allen Browne

If you set the form's KeyPreview property to Yes, you could trap the
keystroke in the form's KeyDown event.

In general, I find it easier to go the other direction, i.e. to write (or
update) the text boxes in the event(s) that cause them to change.
 
F

FBxiii

I think I was having a 'Brain Strain' moment here :)

I just created a Function to update the counts after update of the field.
D'oh!
 
A

Allen Browne

FBxiii said:
I think I was having a 'Brain Strain' moment here :)

I just created a Function to update the counts after update of the field.

Not a good idea.

What happens if the user presses Esc to undo the entry, and you have already
updated the total on the main form?

Or what if the user deletes a row from the subform?
 

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