Hi All
I have a form and when the values in the controls are entered a button is clicked then I want to set the recordsource of a subform but its not working.
ANy help will be much appreciated.
Thanks
I have a form and when the values in the controls are entered a button is clicked then I want to set the recordsource of a subform but its not working.
Code:
If Me.cboArea.Visible = False Then
trsql = "SELECT [qryQA].[FormID], [qryQA].[StandardID], [qryQA].[Score], [qryQA].[QAID], [qryQA].[StandardDoc], [qryQA].[RefID], [qryQA].[SecName] FROM [qryQA]"
Else
strsql = "SELECT [qryQA].[FormID], [qryQA].[StandardID], [qryQA].[Score], [qryQA].[QAID], [qryQA].[StandardDoc], [qryQA].[RefID], [qryQA].[SecName] FROM [qryQA] where [qryQA].[secName]='" & Me.cboArea.Column(1) & "'"
End If
[COLOR=red]Me.sfrmQAsec.RecordSource = strsql[/COLOR]
ANy help will be much appreciated.
Thanks