Hi All
I am new to VBA also have little knowledge of access.I am trying to write a search app. which searches the table based on some criteria(combo boxes) and displays the results in a list box(everything in a single form).I wrote the event procedure for this and set the listbox.RowSour ce to the query(its a dynamic query build from the search criteria)
I know the query works cause i've tested that but i cannot figure out why the list box isn't populated and also when i check the properties of list box it doesn't show the query in RowSource property.
Here is the line of code to set rowsource
Me.ResultsList. RowSource = "SELECT LastName,FirstN ame,PhoneNumber ,Email FROM tbl_PersonalInf o WHERE " & Forms!DisplayFo rm1!SearchBy.Va lue & " LIKE " & Criteria2
Am i doing anything wrong?
Or do i need to add anything?I have no clue where/what i am doing wrong.
thanks
Sree
I am new to VBA also have little knowledge of access.I am trying to write a search app. which searches the table based on some criteria(combo boxes) and displays the results in a list box(everything in a single form).I wrote the event procedure for this and set the listbox.RowSour ce to the query(its a dynamic query build from the search criteria)
I know the query works cause i've tested that but i cannot figure out why the list box isn't populated and also when i check the properties of list box it doesn't show the query in RowSource property.
Here is the line of code to set rowsource
Me.ResultsList. RowSource = "SELECT LastName,FirstN ame,PhoneNumber ,Email FROM tbl_PersonalInf o WHERE " & Forms!DisplayFo rm1!SearchBy.Va lue & " LIKE " & Criteria2
Am i doing anything wrong?
Or do i need to add anything?I have no clue where/what i am doing wrong.
thanks
Sree
Comment