whojstall11
Registered User.
- Local time
- Today, 07:03
- Joined
- Sep 7, 2011
- Messages
- 94
I have and query and a form. ON the form i have two combo boxes. I have a function that i call on update of the combo boxes it requerys the data
But when I change data on the other combo box it does requery right. It disregards the other combo box and adds ALL its data in the results. Instead of filtering some data out based on what I already have.
This is my sql code
Code:
Function Re(T As String)
On Error GoTo Re_Err
DoCmd.Requery "List105"
Re_Exit:
Exit Function
Re_Err:
MsgBox Error$
Resume Re_Exit
End Function
This is my sql code
Code:
SELECT [Copy Of Asset to BU2].BU_Name, [Copy Of Asset to BU2].Year, [Copy Of Asset to BU2].Expr1002 AS Device, [Copy Of Asset to BU2].AssetNumber, [Asset to BU].UserName, [Copy Of Asset to BU2].[Date Ordered], [Copy Of Asset to BU2].Status, [Copy Of Asset to BU2].[Model Number], [Copy Of Asset to BU2].[Warranty Expiration], [Asset to BU].User
FROM [Asset to BU] RIGHT JOIN [Copy Of Asset to BU2] ON [Asset to BU].AH_Assinged_AssetNumber = [Copy Of Asset to BU2].AssetNumber
WHERE ((([Copy Of Asset to BU2].BU_Name)=forms![Final Bu Search]!Combo25)) Or ((([Copy Of Asset to BU2].Year)=forms![Final Bu Search]!Text45)) Or ((([Copy Of Asset to BU2].Expr1002)=forms![Final Bu Search]!Combo62)) Or ((([Copy Of Asset to BU2].AssetNumber)=forms![Final Bu Search]!Text46))
ORDER BY [Copy Of Asset to BU2].BU_Name;