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 buddies
 
There are many ways to do this; however, I'm not really sure on how to
interpret your question because you've made a mention of a subform on your
main form. I don't see why you would need to use a subform to display a set
of values filtered by a combobox on the main form. This is important
because there are differences between main forms and subforms in the ways of
passing parameters to SQL-Server.

Also, when working with ADP, it's probably a better idea to build stored
procedure (SP) than to build Views.
 
Back
Top