Please help - urgent

S

subs

I have the following table where carrier field is empty
Ost Ocity Dstate Dcity Region Carrier
A B C Dcity MW
E F G H East
I J K L South
M N O P MW
Q R S T East

I need to create a query which should ask the user to enter the
following info


carrier for MW region
Carrier for East region
Carrier for South region


Based on answers inputted by the user, the carrier field has to be
populated.


The following condition needs to be satisfied-
the carrier field will have to be same if it has same region.


Example if the user enters the following info


carrier for MW region Sai
Carrier for East region Mai
Carrier for South region yoi

Then

Final table will look like this


Ost Ocity Dstate Dcity Region Carrier
A B C Dcity MW sai
E F G H East mai
I J K L South yoi
M N O P MW sai
Q R S T East mai


can you help with the query or evern a Form? which ever will be
easier
and effective?

thanks
 
K

Ken Snell \(MVP\)

Is this a one-time activity that you need to do? If yes, you could use an
update query like this:

UPDATE TableName
SET Carrier =
Switch(Region="MW", [Enter Carrier for MW Region:],
Region="East", [Enter Carrier for East Region:],
Region="South", [Enter Carrier for South Region:]);
 
S

subs

Is this a one-time activity that you need to do? If yes, you could use an
update query like this:

UPDATE TableName
SET Carrier =
Switch(Region="MW", [Enter Carrier for MW Region:],
Region="East", [Enter Carrier for East Region:],
Region="South", [Enter Carrier for South Region:]);

--

        Ken Snell
<MS ACCESS MVP>




I have the following table where carrier field is empty
Ost     Ocity   Dstate  Dcity   Region  Carrier
A       B       C       Dcity   MW
E       F       G       H       East
I       J       K       L       South
M       N       O       P       MW
Q       R       S       T       East
I need to create a query which should ask the user to enter the
following info
carrier for MW region
Carrier for East region
Carrier for South region
Based on answers inputted by the user, the carrier field has to be
populated.
The following condition needs to be satisfied-
the carrier field will have to be same if it has same region.
Example if the user enters the following info
carrier for MW region               Sai
Carrier for East region             Mai
Carrier for South region           yoi

Final table will look like this
Ost     Ocity   Dstate  Dcity   Region  Carrier
A       B       C       Dcity   MW      sai
E       F       G       H       East    mai
I       J       K       L       South   yoi
M       N       O       P       MW      sai
Q       R       S       T       East    mai
can you help with the query or evern a Form? which ever will be
easie
and effective?
thanks- Hide quoted text -

- Show quoted text -

thanks but the user might update the carrier field many times. Is
there a form or some other way this can be solved? thanks
 
K

Ken Snell \(MVP\)

You can create a form that has a separate textbox for each of the carrier
types, then put a command button on the form that will run a stored query
similar to this:

UPDATE TableName
SET Carrier =
Switch(Region="MW", Forms![NameOfYourForm]![NameOfMWTextbox],
Region="East", Forms![NameOfYourForm]![NameOfEastTextbox],
Region="South", Forms![NameOfYourForm]![NameOfSouthTextbox]);

--

Ken Snell
<MS ACCESS MVP>



Is this a one-time activity that you need to do? If yes, you could use an
update query like this:

UPDATE TableName
SET Carrier =
Switch(Region="MW", [Enter Carrier for MW Region:],
Region="East", [Enter Carrier for East Region:],
Region="South", [Enter Carrier for South Region:]);

--

Ken Snell
<MS ACCESS MVP>




I have the following table where carrier field is empty
Ost Ocity Dstate Dcity Region Carrier
A B C Dcity MW
E F G H East
I J K L South
M N O P MW
Q R S T East
I need to create a query which should ask the user to enter the
following info
carrier for MW region
Carrier for East region
Carrier for South region
Based on answers inputted by the user, the carrier field has to be
populated.
The following condition needs to be satisfied-
the carrier field will have to be same if it has same region.
Example if the user enters the following info
carrier for MW region Sai
Carrier for East region Mai
Carrier for South region yoi

Final table will look like this
Ost Ocity Dstate Dcity Region Carrier
A B C Dcity MW sai
E F G H East mai
I J K L South yoi
M N O P MW sai
Q R S T East mai
can you help with the query or evern a Form? which ever will be
easie
and effective?
thanks- Hide quoted text -

- Show quoted text -

thanks but the user might update the carrier field many times. Is
there a form or some other way this can be solved? thanks
 

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

form with condition needed 0
Query or a form required 9
SQL query 1
please help 1
user entering the data 4
Query help 3
Tranportation query - interesting one 1
please help with this query 1

Top