I have trouble making a button work on my subform.
The query behind the scences is simple. it works if i manually enter the 3 answers. I use the following 3 criterias:
[forms]![frmPriceMain]![SoldtoID2]
[forms]![frmPriceMain]![ShipID2]
[forms]![frmPriceMain]![FormulaID]
Now the button on the subform has this On Click Event:
Private Sub Detail_Sales_Records_Click()
DoCmd.OpenQuery "2095Qry-SalesTransactionsFiltered", acNormal, acEdit
DoCmd.Maximize
End Sub
So when i am on a form record and hit the subform Button, i get no records.
but if i manually run the qry, i get my records. so the button is now working for me. Maybe some kind of SetFocus thing which i am unfamiliar with?
Penwood
The query behind the scences is simple. it works if i manually enter the 3 answers. I use the following 3 criterias:
[forms]![frmPriceMain]![SoldtoID2]
[forms]![frmPriceMain]![ShipID2]
[forms]![frmPriceMain]![FormulaID]
Now the button on the subform has this On Click Event:
Private Sub Detail_Sales_Records_Click()
DoCmd.OpenQuery "2095Qry-SalesTransactionsFiltered", acNormal, acEdit
DoCmd.Maximize
End Sub
So when i am on a form record and hit the subform Button, i get no records.
but if i manually run the qry, i get my records. so the button is now working for me. Maybe some kind of SetFocus thing which i am unfamiliar with?
Penwood