Search form to populate datasheet instead of listbox

megatronixs

Registered User.
Local time
Today, 11:55
Joined
Aug 17, 2012
Messages
719
Hi all,

I have the below code to do searches for example the creator of some minutes. The results are shown in a listbox. Is it possible to show this in a datasheet instead?

Code:
Private Const BASE_SQL As String = _
"SELECT record_id, subject, date_of_meeting, invitation_status, time_of_meeting, who_minutes_tracker, meeting_room, participant_name " & _
"FROM tbl_actions " & _
"<whereclause>" & _
"ORDER BY record_id;"
Code:
Private Sub search_creator_text_Change()
' This event fires for every keystroke in the textbox
Dim where As String
If Me.search_creator_text.Text <> "" Then
where = "WHERE who_minutes_tracker LIKE '*" & Me.search_creator_text.Text & "*' "
End If
Me.search_results_list.RowSource = Replace(BASE_SQL, "<whereclause>", where)
End Sub

greetings.
 
hi,
it will be in a subform. The main form has the search text, and below there is the datasheet subform.

Greetings.
 

Users who are viewing this thread

Back
Top Bottom