prompts

  • Thread starter Thread starter Sarah at DaVita
  • Start date Start date
S

Sarah at DaVita

I have a column that hold account number in number format. I am trying to
allow the user to list the accounts they need. I an trying to us In ([enter
account with , to separate]) It works with one account but when I put in two
it does not work. Anyone have any ideas?
 
On Mon, 4 Feb 2008 13:06:02 -0800, Sarah at DaVita

The IN clause doesn't work very well in combination with a parameter
query. You'd want to look into creating a dynamic sql statement, in
which IN clause is very well supported.

-Tom.
 
Hi. Can you give me an example of that?

Tom van Stiphout said:
On Mon, 4 Feb 2008 13:06:02 -0800, Sarah at DaVita

The IN clause doesn't work very well in combination with a parameter
query. You'd want to look into creating a dynamic sql statement, in
which IN clause is very well supported.

-Tom.

I have a column that hold account number in number format. I am trying to
allow the user to list the accounts they need. I an trying to us In ([enter
account with , to separate]) It works with one account but when I put in two
it does not work. Anyone have any ideas?
 
On Mon, 4 Feb 2008 18:56:01 -0800, Sarah at DaVita

I'm not sure exactly how you want to use your statement. In my example
we will have Form1 with Textbox1 to enter comma-separated ID values,
and Form2 (bound to the Customers table) to display the results.
In Textbox1.AfterUpdate:
dim sql as string
sql = "CustomerID in ("
sql = sql & Textbox1.Value
sql = sql & ")"
DoCmd.OpenForm "Form2",,,sql

-Tom.

Hi. Can you give me an example of that?

Tom van Stiphout said:
On Mon, 4 Feb 2008 13:06:02 -0800, Sarah at DaVita

The IN clause doesn't work very well in combination with a parameter
query. You'd want to look into creating a dynamic sql statement, in
which IN clause is very well supported.

-Tom.

I have a column that hold account number in number format. I am trying to
allow the user to list the accounts they need. I an trying to us In ([enter
account with , to separate]) It works with one account but when I put in two
it does not work. Anyone have any ideas?
 

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

Back
Top