G
Guest
Hi Group
I am trying to filter my main form (frmMainForm) from the results produced by a search form (frmSearch). The results of the search form are displayed in a list box (lstResult). My working code (reproduced below) can only read the first row of the list box but how can I filter my main form when multiple rows (and Farmers ID's) are produced? (I have tried passing the results of the search form to a Where clause but this also does not work because of references to subforms.
Here is code that I am using to filter my main form
Dim stDocName As Strin
Dim stLinkCriteria As Strin
stDocName = "frmMainForm
stLinkCriteria = "[FarmerID] = " & Me!lstResult.Column(0
DoCmd.OpenForm stDocName, , , stLinkCriteri
DoCmd.Close acForm, "frmSearch
Thank
Tony
I am trying to filter my main form (frmMainForm) from the results produced by a search form (frmSearch). The results of the search form are displayed in a list box (lstResult). My working code (reproduced below) can only read the first row of the list box but how can I filter my main form when multiple rows (and Farmers ID's) are produced? (I have tried passing the results of the search form to a Where clause but this also does not work because of references to subforms.
Here is code that I am using to filter my main form
Dim stDocName As Strin
Dim stLinkCriteria As Strin
stDocName = "frmMainForm
stLinkCriteria = "[FarmerID] = " & Me!lstResult.Column(0
DoCmd.OpenForm stDocName, , , stLinkCriteri
DoCmd.Close acForm, "frmSearch
Thank
Tony