Hello there,
i'm working on a lil search application using VBA 03 and MySQL.
the search criterias are name, age, gender, telephone, kids age and what not.
with regards to the single SELECT statement, a friend commented that the most important criteria should be added right at the end (right) and least important critera would have to be at the start (left)
VB Code:
rst.Open "SELECT * FROM [Contact 2] WHERE [Name] " & sName & " AND [Telephone] " & sTel & " AND [18 Kids] " & sKids & " AND [13 Gender] " & sGender & " AND [ActAge] " & Combo8.ItemData(Combo8.ListIndex) & " " & sAge & "", CurrentProject.AccessConnection, adOpenDynamic, adLockOptimistic
even after having made arrangements in the order, the search still doesn't work as it is intended.
perhaps someone could advice me on how to create a proper search application or write a proper select statement to do searching.
thank you
Astro




Reply With Quote