Look for the tabCtl object, and in the change or click event, enter:
dim strsql as string
If [your tabCtl Name].value = [the tabnumber that holds your subform] Then
strsql = "SELECT * from [yourtable that is the source of the subform]"
' if there are Where conditions, add them to the sql string also
Me!yoursubfrmName.Form.RecordSource = strsql
Me!yoursubfrmName.Form.Requery
End If
Tabs are usually zero-based, so the first tab is 0, then 1, etc.
Damon
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.