combo box filter

  • Thread starter Thread starter Joseph
  • Start date Start date
J

Joseph

Seems like i'm having great difficulty. I've searched and search and
found few examples but it will not work. Here is the situation. I have
a table with computer information like ip, Operating System, model
number, serial number. Primary key is serial number. All the machine
will be either be windows or unix.

I've create a form that has a combo box which grabs a unique Operating
system type which is windows or unix. Later time will have linux etc.
Now i have a subform that filters based on the combo box but it does not
work. It will not filter the subform and takes me to a debugger. I've
tried to follow example from the web but it doesnt seem to work. please
help.

thanks
 
code that fails:
Sub SetFilter()

Dim LSQL As String

LSQL = "select * from tblMain"
LSQL = LSQL & " where OS_Type = '" & cboSelected & "'"
' fails here everytime. Syntax is correct the name and form name is
' spelled correctly.
->Form_frmMain_sub.RecordSource = LSQL

End Sub
 
Back
Top