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

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
 
S

Sylvain Lafontaine

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top