SourceObject criteria

G

gator

Can SourceObject include a criteria clause?
I have a comboBox that selects dates and a subform displays records from a
query. Here is some code below...

Private Sub Form_Load()
Child16.SourceObject = "Query.FundsAllYears"
End Sub

Private Sub ComboBox_AfterUpdate()
Child16.SourceObject = "SELECT FundDate,FundID,FundName,Balance FROM
FundsAllYears WHERE [FundDate] = ComboBox;"
End Sub

How do I add criteria to the SourceObject for the AfterUpdate event?
 
G

Graham Mandeno

Hi gator

Use the LinkMasterFields and LinkChildFields properties:

Child16.LinkMasterFields = "Combobox"
Child16.LinkChildFields = "FundDate"
 

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