SQL query

S

subs

OST Ocity Dst Dcity Region Carrier
MI kalamazoo NJ Parsippany EC
OH Cincin MA Boston EC
NJ Dover MI Detroit MW
OH Columbus OH Cincinnati MW
NJ Dover MA Boston EC
OH Columbus MI Detroit MW
OH Cincin MA Boston EW

I want to create a query or report in this way- First of all it
should ask the user to enter carrier for EC region and carrier for
MW region. The query should then populate the carrier field with the
response entered by the user depending upon whether region is EC or
MW.

Example- [Enter the carrier for EC] - Saia
[Enter the carrier for MW]- RL

User enters Saia and RL as values.
So the final output should list all the columns along with updating
the carrier column like below

Carrier
Saia
Saia
RL
RL
Saia
RL
Saia


I want to avoid update query? is there a single SQL Query
 
J

John Spencer

Seems a strange way to handle something like this, but you could try an
expression that looks like the following.

Field: Carrier: IIF(Region = "EC",[Enter Carrier for EC],IIF(Region = "MW",
[Enter Carrier for EW],Null))

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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

Similar Threads

Query help 3
Query or a form required 9
Please help - urgent 3
form with condition needed 0
sql query reqest 1
user entering the data 4
complex sorting query 3
query help urgent needed 1

Top