Refresh / Requery Subform

D

Del

I have run into a bit of a problem. I have a Access 2000 database that
I keep track of event. On the main form I have a subform that gives
the over all stats for all events (The subform simply shows the
different types of events that the current count of each event in the
table. There is no data entry on the subform). The subform's control
source is a query that counts the number of times each even is listed
in the main table. The problem I am having is refreshing the subform
after a new event type is chosen on the main form (The event type is
chosen from a combo box on the main form). I would like the subform to
update to show the new event count after the user has chosen the
event.

Thank you!
 
A

Albert D. Kallal

IN the combo box after update event, you can simple re-load the sub form
like:


dim strSql as string

strSql = "select * from qryCounts where eventID = " & me.MyComboEventId

me.MySubFormContorlName.Form.recordsouce = strSql
 

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