Help

  • Thread starter Thread starter texasman
  • Start date Start date
T

texasman

Can someone help me out with creating a statement for my query. What i
currently does is come up and prompt the user to enter a customer nam
and then enter a product id. What I need a statement for is a loo
that will continually prompt the user for a product id until a nul
value is entered. It would also need to tie back to the same custome
name every time since the customer and products are in two differen
tables. Something like this:

Enter Customer Name: Microsoft
Enter Product ID: 1235
Enter Product ID: 123456
Enter Product ID:

then it ends
 
Can someone help me out with creating a statement for my query. What it
currently does is come up and prompt the user to enter a customer name
and then enter a product id. What I need a statement for is a loop
that will continually prompt the user for a product id until a null
value is entered. It would also need to tie back to the same customer
name every time since the customer and products are in two different
tables. Something like this:

Enter Customer Name: Microsoft
Enter Product ID: 1235
Enter Product ID: 123456
Enter Product ID:

then it ends.

And then what? You want to run a Query for all records where Customer
is Microsoft, and match any of the selected ProductID's?

There are a number of ways to do this, but it might be simplest to
have a small temporary table which exists just to supply criteria.
You'ld enter productID's (probably using a combo box) into the rows of
this table, using a continuous form; perhaps you could have a Customer
combo box on the form header. Your query would then include the temp
table in a join. When you close the form or report based on the query,
you could delete or empty the criteria table.
 
Back
Top