Ok, i'm tired of many hours searching thread by thread, i don't find it... i need some help, if anyone can help me in here i would apreciate.. i have a basic database and i'm applying some code to some things and this is the final thing! i want to do a personalized search.
One form with more than one combobox, i want that when i press "Search" it opens another form to show the results of the selected comboboxes but here is the thing! i want that even the comboboxes that are left empty don't affect the search.
I'm able to do only if i select values....
here is the code:
Can anyone help me? Thank you.
One form with more than one combobox, i want that when i press "Search" it opens another form to show the results of the selected comboboxes but here is the thing! i want that even the comboboxes that are left empty don't affect the search.
I'm able to do only if i select values....
here is the code:
Code:
Private Sub search_Click()
On Error GoTo Err_search_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_personalized_query_search"
stLinkCriteria = "[rank]= " & Me![rank] & " And [class]=" & Me![class] (and some more)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_search_Click:
Exit Sub
Err_search_Click:
'msgbox Err.Description
Resume Exit_search_Click
End Sub
Can anyone help me? Thank you.