Hi,
Could you please help me.
I was looking to use a combo box to filter on a sub form.
The form I have is called - DrawingNo(AddDrawingMultiLines) fm. (I know now I should not have used parentheses and a space in my name and I didn't want to change my form name because I would have to do a lot of changing).
The name of the form is not recognized. Is there a way to Refer to this form with the parentheses and space.
for this ---- Form_DrawingNo(AddDrawingMultiLines) fm.RecordSource = LSQL
The Compile error comes up - method or data member not found
I have tried
Form_[DrawingNo(AddDrawingMultiLines) fm].RecordSource
and "Form_[DrawingNo(AddDrawingMultiLines) fm].RecordSource"
and Form_"DrawingNo(AddDrawingMultiLines) fm".RecordSource.
I can't figure out how to write this.
This is the code
_______________
Private Sub cboSelected_AfterUpdate()
'Call subroutine to set filter based on selected DrawingNoID
SetFilter
End Sub
______________________________________
Sub SetFilter()
Dim LSQL As String
LSQL = "select * from DrawingNo tbl"
LSQL = LSQL & " where DrawingNoID = '" & cboSelected & "'"
Form_DrawingNo(AddDrawingMultiLines) fm.RecordSource = LSQL
End Sub
Could you please help me.
I was looking to use a combo box to filter on a sub form.
The form I have is called - DrawingNo(AddDrawingMultiLines) fm. (I know now I should not have used parentheses and a space in my name and I didn't want to change my form name because I would have to do a lot of changing).
The name of the form is not recognized. Is there a way to Refer to this form with the parentheses and space.
for this ---- Form_DrawingNo(AddDrawingMultiLines) fm.RecordSource = LSQL
The Compile error comes up - method or data member not found
I have tried
Form_[DrawingNo(AddDrawingMultiLines) fm].RecordSource
and "Form_[DrawingNo(AddDrawingMultiLines) fm].RecordSource"
and Form_"DrawingNo(AddDrawingMultiLines) fm".RecordSource.
I can't figure out how to write this.
This is the code
_______________
Private Sub cboSelected_AfterUpdate()
'Call subroutine to set filter based on selected DrawingNoID
SetFilter
End Sub
______________________________________
Sub SetFilter()
Dim LSQL As String
LSQL = "select * from DrawingNo tbl"
LSQL = LSQL & " where DrawingNoID = '" & cboSelected & "'"
Form_DrawingNo(AddDrawingMultiLines) fm.RecordSource = LSQL
End Sub