prompts

  • Thread starter Sarah at DaVita
  • 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?
 
T

Tom van Stiphout

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.
 
S

Sarah at DaVita

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?
 
T

Tom van Stiphout

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?
 
Top