Hi All,
I have tried different samples of combo box and still unable to finalize my form:
First let me tell you what I got and what I need:
On an unbound form I have created a subform [frmMaster_sub] from MASTERLIST QUERY. This QUERY contains
SNAME, LPODate, QTY, UNIT PRICE, AMOUNT and STATUS.
On the FORM (frmStatus) I Have created an unbound Combo boxe:
COMBO – Created created from value list
The idea is from [COMBO] I can select a particular SUPPLIER and it will list all the the purchases for the specific supplier, then I would like to add another 2 combos for date and status. wherein if I select a particular Date and status from a combo box then it will show all purchase with the same Date and status for the supplier.
So far I'm having the following vb code:
Private Sub Command2_Click()
If (Eval("[Forms]![frmStatus]![Combo] Is Null")) Then
MsgBox "Please select value first", vbOKOnly, "No Selection"
ElseIf (Eval("[Forms]![frmStatus]![Combo] Is Not Null")) Then
strSQL = "Select * from MASTERLIST where"
strSQL = strSQL & " SNAME=" & "Forms!frmStatus!Combo"
Me!frmMaster_sub.Form.RecordSource = strSQL
End If
End Sub
Private Sub Command3_Click()
strSQL = "Select * from MASTERLIST"
Me!frmMaster_sub.Form.RecordSource = strSQL
End Sub
This works perfectly, where I am stuck now is how do I do the second & third filter. Any guidance would be greatly appreciated.
Thanks,
Rogue