Member Avatar for gowans07

Main Form = Frm_Engineer_Search
Sub Form = Frm_Engineers
Frm_Engineers populated by Tbl_Engineers

I've been trying to link together a textbox with a subform so when a surname is entered into TxtSearch and CmdSearch is click it will run a query/refresh the subform displaying the correct record which correspond to the entered surname. Is this possible? I've tried entering into Qry_Engineer_Search in the Surname attribute criteria [Forms!][Frm_Engineer_Search!][TxtSearch] and add me.refresh to CmdSearch Click event but it just refreshes the whole form.

Any pointers? Thanks in advance

Recommended Answers

All 2 Replies

mr.refresh should refresh the whole form. If you want to requery the subform (and only that) you should use me.subform_name.requery (of course replace subform_name with your subform's name).

Member Avatar for gowans07

Hi, i havent managed to get the subform working using Frm_engineers, so instead i've created a subform using an existing query. Does this still count as a subform as such, i've got an unbound text box which searches for surname and then went the command button is clicked it runs me.refresh and displays the correct record :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.