Search in SubForm

mkkashif

Registered User.
Local time
Today, 11:18
Joined
Sep 1, 2004
Messages
88
i have orders form in that i have subform ordersdetail Like """Northwind""".
My Question is that i want to Search in OrdersDetail.
i have a combobox SearchOrderDetail.i have my codes in that combo Box.My Sub Form ordersdetail has a Field Code.
i want when i click on the SearchOrderDetail Combo Box.After that if there is somematching goes to Record in SubForm if there is no Record then it's pop-up message.
Any Help
 
No can Answer my Question

is the my question is to much difficult no body reply me
 
i think it works like this

I assume FieldCode is the name of the Link between th main and sub form, remember that the main form drives the subform

In the query that is the record source for the form in the criteria for the mainform FieldCode
put forms!orders!cboSearchorderdetail That is reference your combo box.

In the after update event for the combo box place code such as

Private Sub cboSearchorderdetail_AfterUpdate()
Me.Requery
If IsNull(Me.[mainformFieldCode].Value) Then GoTo message Else Exit Sub
message:
MsgBox ("ERROR")
End Sub

Hope this helps
 

Users who are viewing this thread

Back
Top Bottom