ive been looking in google for the answer to this question....
here is the situation:
i have a form the source is my maintable... from the main table i created a query for the search button in my form like this...
Search by Municipality: "enter the desired municipality to view"
Search by District: "enter the desired district to view"
Click to Clear click to Search
after clicking the search for example you put 3rd district in Search by District.. the query will gather all the 3rd district "ONLY".. my problem is i cant put it in report... in my report the four district is shown...
any ideas how to do this?
my codes in clear button:
and in my search button:
if any one knows if i can add like this code in search button:
or any suggestion?
ok i just test this code in my searchbutton, i put 3rd district in search by istrict and when i hit the search button the report appear BUT all the district was there... i only search the 3rd district..
here is the code:
here is the situation:
i have a form the source is my maintable... from the main table i created a query for the search button in my form like this...
Search by Municipality: "enter the desired municipality to view"
Search by District: "enter the desired district to view"
Click to Clear click to Search
after clicking the search for example you put 3rd district in Search by District.. the query will gather all the 3rd district "ONLY".. my problem is i cant put it in report... in my report the four district is shown...
any ideas how to do this?
my codes in clear button:
Code:
Private Sub Clear_Click()
Me.qmunicipality = ""
Me.qdistrict = ""
Me.Requery
End Sub
Code:
Private Sub Search_Click()
DoCmd.OpenQuery "Masterlist Query", acViewNormal
End Sub
Code:
Docmd.OpenReport "rptmasterlist", acviewReport
ok i just test this code in my searchbutton, i put 3rd district in search by istrict and when i hit the search button the report appear BUT all the district was there... i only search the 3rd district..
here is the code:
Code:
Private Sub Command34_Click()
DoCmd.OpenQuery "Masterlist Query", acViewNormal
DoCmd.OpenReport "Masterlist", acViewReport
End Sub