Continuous Form Question

  • Thread starter Thread starter Bob V
  • Start date Start date
B

Bob V

I have a continuous form that has
HorseID,HorseName,ExpensesItem,ExpensesCost
I have a combo box cmbsearch that shows HorseID,HorseName, that is queried
to a query to only show unique Names
How do I filter my Continuous form so as when I select a HorseID,HorseName
it only shows those records below
Thanks for any help..........Bob
 
Hi Bob,
Assuming that cmbSearch is on the main form and HorseID is its bound column,
use the AfterUpdate event of the combo:

Private Sub CboSearch_AfterUpdate()

Form("SubFormNameHere").Form.Filter = _
"[HorseID]=" & Me.CboSearch
Form("SubFormNameHere").Form.FilterOn = True

End Sub




|
|
| I have a continuous form that has
| HorseID,HorseName,ExpensesItem,ExpensesCost
| I have a combo box cmbsearch that shows HorseID,HorseName, that is queried
| to a query to only show unique Names
| How do I filter my Continuous form so as when I select a HorseID,HorseName
| it only shows those records below
| Thanks for any help..........Bob
|
|
 
That's easy,

SELECT HorseID FROM AllHorses WHERE HorseCurrentLocation<>"NSW" _
AND ThisYearLuck > LastYearLuck :)

Regards


| Brilliant thanks JK....working on our Mel Cup bet ;)
| Regards Bob
|
| | > Hi Bob,
| > Assuming that cmbSearch is on the main form and HorseID is its bound
| > column,
| > use the AfterUpdate event of the combo:
| >
| > Private Sub CboSearch_AfterUpdate()
| >
| > Form("SubFormNameHere").Form.Filter = _
| > "[HorseID]=" & Me.CboSearch
| > Form("SubFormNameHere").Form.FilterOn = True
| >
| > End Sub
| >
| >
| >
| >
| > | > |
| > |
| > | I have a continuous form that has
| > | HorseID,HorseName,ExpensesItem,ExpensesCost
| > | I have a combo box cmbsearch that shows HorseID,HorseName, that is
| > queried
| > | to a query to only show unique Names
| > | How do I filter my Continuous form so as when I select a
| > HorseID,HorseName
| > | it only shows those records below
| > | Thanks for any help..........Bob
| > |
| > |
| >
| >
|
|
 
Back
Top