combo box filter

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
 
J

Joseph

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top