how to pass value from a form to sql view (query)

  • Thread starter Thread starter cyruslove
  • Start date Start date
C

cyruslove

hi guys!

i have recently started SQL server based programming,
i am creating a view (query) on my sql server and want to pass a value from a
combo box on a form.
how can i do that. i could not build criteria as we do in .mdb query design.
short information of the form:
i am using a subform which will be based on a query that has a criteria
receiving value from a combo box on the main form, so when user selects any
value from the combo box the subform will show only the matching records.
looking forward for a quick solution buddies.
 
This is one way
in the After Update event

Me.FilterOn = False
Me.Filter = "[Some_Criteria] = '" & Me.cboSomeComboBox & "'"
Me.FilterOn = True
 
Back
Top