Refreshing a Form after a combo box update

JEA

Registered User.
Local time
Today, 20:15
Joined
Nov 2, 2007
Messages
83
I want to refresh more than one text box after a combo box is updated. The text boxes contain expresions that use the info from the combo box. If the combo box changes, the text boxes need to change.

I know that to refresh one text field I put "Refresh([textbox])" in the "After Update" field of the combo box's properties, but I don't know the syntax for more than one object.

It won't accept "Refresh([textbox1],[textbox2])", "Refresh([textbox1] [textbox2])", "Refresh([formname])", "Refresh([Forms]![formname])" or any other permatation I can think of. I can't even find anything on the Refresh() function in Access Help. I only discovered that it works out of frustration.

I would prefer it to refresh all objects on the form, rather than me entering each object.

Can anyone help?
 
Last edited:
Me.Refresh doesn't work. It thinks it's an object.
 
Me refers to the entire Form and Refresh is one of the methods of a form. It may not be what you want but it should not throw an error. You also have Me.Recalc and Me.Repaint as methods.

Edit: Look in VBA Help for these functions not Access Help. Open a code window before pressing F1
 
:) Thanks.

I used 'Recalc' as I think 'Refresh' refreshes the form and everything the form is linked to (such as records), 'Recalc' just recalculates the expresions in the form.

It still doesn't like the 'Me' bit, it says it can't find the object called 'Me'. I had to use '=[Form].[Recalc]'
 
Last edited:
Can you post all of the code you are using starting with Private Sub and ending with End Sub? I'm glad you got things working but there is something wrong when it does not like Me.
 

Users who are viewing this thread

Back
Top Bottom