Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing parameters from forms to query

Status
Not open for further replies.
Jun 1, 2006
58
US
Hi all,

I am not vey familiar with access, hence this question.

I have a form which has a text box. Users are meant to input a value (character string) into this textbox. Based on what they input, this string needs to be passed to a query which will then generate a report.

I am using the following

Forms!frmReport!cboPayerId

If I select just this value, it works. but I need to use this value like this

WHERE abd in (Forms!frmReport!cboPayerId)

and it doesnt work. Do I need to convert this into a char value first or what should I do?

Thanks for ur help
 
Are you expecting to type multiple values in the cboPayerID? What types of values are coming from the cboPayerID?

You should be able to use:

WHERE abd = Forms!frmReport!cboPayerId


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top