Refresh Sub Form

chrisjames25

Registered User.
Local time
Today, 22:13
Joined
Dec 1, 2014
Messages
404
Hi I have New Category Form.

WIthin the form is a subform continuous that displays all the existing categorys so the user can see what there currently is.

When i add a new category how do i get the subform to refresh to reflect the added new category.
 
Use Requery rather than Refresh.
 
Apologies but how would i write that as VBA code in the main Form cmd button on click.

not sure how to reference another form within an existing form.
 
Apologies but i tried this and it keeps bugging

Code:
 Me!Tbl_Category.Form.Requery
 
"it keeps bugging" is rather vague. Are you referencing the subform control properly? The subform control is the "window" that holds the subform. It may, or may not, have the same name as the subform itself, depending on how you added it to the main form. Is Tbl_Category the correct name for the subform control?
 
Can you attach the db here?
 
Hi

Thanks for all your help. Solved the problem thanks to you guys.

I was referencing the form within the subform rather than subform control. Didnt even realise such a thing existed.

Code:
Me.Child585.Form.Requery

Solved my issue. Howvever i will now rename my subform control to something a little less generic ;)

As ever you guys are great for all the help. It really is appreciated in the early weeks of trying to learn something completely new to me.
 

Users who are viewing this thread

Back
Top Bottom