subforms

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

Hi
Within SubformA, I click a button which :
picks up VariableA and VariableB
Displays in main form where record matches VariableA
Open up SubformB which displays all of SubformB child records that match
parent Main Record.

However what I want to do is to display only SubformB child records that not
only match parent Main Record , but where a field in SubformB matches
VariableB.

Does that make sense please and is it possible? Would I do this in the
source query for subformB and if so how would I show the variable, or do I
do it in code onClick on original button on subformA

Thanks

Alex
 
You could set the recordsource of subformB to be some SQL that takes into
account variable B.

Recordsource = "Select * from MyTable Where MyField = ' " & varB & " ' "
 
Back
Top