[AccessD] filtering a subform

Stuart McLachlan stuart at lexacorp.com.pg
Thu Sep 22 21:30:59 CDT 2005


On 22 Sep 2005 at 19:33, Susan Harkins wrote:

> I need to use a SQL statement. 
> 

This works exactly the same as the first example:

Private Sub Command9_Click()
If Forms!form2!Form1.Form.RecordSource = "SELECT Table1.* FROM Table1; " 
Then
 Forms!form2!Form1.Form.RecordSource = "SELECT Table2.* FROM Table2; "
Else
  Forms!form2!Form1.Form.RecordSource = "SELECT Table1.* FROM Table1; "
End If
 End Sub
-- 
Stuart





More information about the AccessD mailing list