Hi: I am new to this forum. I hope someone can help me out.
I am attempting to set the recordsource for a subform using VBA. I am receiving the following error: Compile error: Syntax error
I am using the following code:
' Ensure a group has been selected
If IsNull(Forms!frmCiaGroups1.cboSelectedGroup) Then
Call NoGroupEntered
Exit Function
End If ' for Group Not Entered
Dim strGroup As String
Dim dbs As DAO.Database
Dim qdf As QueryDef
Set dbs = CurrentDb()
strGroup = "'" & Forms!frmCiaGroups1![GroupSymbol] & "'"
Forms!frmCiaGroups1!frmCiaGroupsSub.RecordSource = "SELECT * FROM qryCIA_Group_Sub WHERE Left([TxGroup],3)" & = & strGroup
Thank you for your help, Don
I am attempting to set the recordsource for a subform using VBA. I am receiving the following error: Compile error: Syntax error
I am using the following code:
' Ensure a group has been selected
If IsNull(Forms!frmCiaGroups1.cboSelectedGroup) Then
Call NoGroupEntered
Exit Function
End If ' for Group Not Entered
Dim strGroup As String
Dim dbs As DAO.Database
Dim qdf As QueryDef
Set dbs = CurrentDb()
strGroup = "'" & Forms!frmCiaGroups1![GroupSymbol] & "'"
Forms!frmCiaGroups1!frmCiaGroupsSub.RecordSource = "SELECT * FROM qryCIA_Group_Sub WHERE Left([TxGroup],3)" & = & strGroup
Thank you for your help, Don