Query using form textbox.

  • Thread starter Shakerr via AccessMonster.com
  • Start date
S

Shakerr via AccessMonster.com

Dears,

Please help me with this.

I have a table containing about 10000 customers, and each customer has his
own CUST_ID.

Now I want to make a form containing a command bottom to run a query,
And a textbox to paste the wanted customers which copied from excel file,
now when I paste the customers number to the textbox it appears vertically
one after one, And till now it's ok, but when I run the query only the first
pasted customer returns by the query.

Is there any solution to make the all pasted CUST_IDs returned by the query?


Best Regards……..
 
K

KARL DEWEY

You did not post your query criteria. I expect it to be something like this --
Like [Forms]![YourFormName]![TextBox] & "*"
If so, then change to this --
Like "*" & [Forms]![YourFormName]![TextBox] & "*"
 
S

Shakerr via AccessMonster.com

Dear, here is my query

SELECT Rep_baddebt.*
FROM Rep_baddebt
WHERE (((Rep_baddebt.[Customer N])=[Forms]![Form1]!
  • ));

    but i tred yours then the query returned all the table record, where i want
    to return only the pasted ones.

    thanks

    KARL said:
    You did not post your query criteria. I expect it to be something like this --
    Like [Forms]![YourFormName]![TextBox] & "*"
    If so, then change to this --
    Like "*" & [Forms]![YourFormName]![TextBox] & "*"
    [quoted text clipped - 12 lines]
    Best Regards……..
 
Top