Looking for a dynamic Access template.

Can someone suggest a MS Access template I can download that has a form header that contains an unbound text field.  When the user starts entering data into the text field a datasheet sub-form on the main form starts to populate with records that contain the text being typed in the text field and changes as the user keeps typing.
Who is Participating?
Dale FyeConnect With a Mentor Commented:

I would generally recommend against this, unless the number of records in the unfiltered datasheet is relatively small. The process is relatively simple, create a popup form and open that form from some event (probably a command button or an unbound label click event).

Use the Change (txtFilter_Change) event of the textbox on your popup form to modify the Filter property of the subform.  Syntax would look something like:
Private Sub txtFilter_Change()

     Forms!YourMainForm!subDatasheetControlName!Form.Filter = me.txtFilter.Text
     Forms!YourMainForm!subdatasheetControlName!Form.FilterOn = Len(me.txtFilter.Text) > 0

End Sub

Open in new window

Note the use of the .text extension in the change event.  The .value property of the control is the default, but it does not change until you hit enter, table out of the control, or click on some other control.  The only time you can refer to the .text property of the control is when that control has the focus.
SteveL13Author Commented:
Excellent advise and solution.  Thank you.
Dale FyeCommented:
glad to help
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.