Not exactly sure what you mean, but if the variables company_id etc are coming from a form field, you could build the query up before executing, e.g.:
Code:
Dim query: query = "SELECT * FROM net_fares "
Dim where: where = ""
If company_id <> "" Then
where = where & "AND companyid = '" & company_id & "' "
End If
... process other fields ...
If where <> "" Then
' add the where clause without the initial "AND"
query = query & Mid(where, 5)
End If
Set rs1 = con.Execute(query, , adCmdText)
BTW, why not split your code onto separate lines using "_" if lines are very long, makes it easier to read and not so hard to reply to on the forums as well!
HTH,
Chris