Viewing data based on criteria

  • Thread starter brownti via AccessMonster.com
  • Start date
B

brownti via AccessMonster.com

I have a table with information pertaining to some doors. The doors each
have a size, material and swing. I also have a rooms table that has various
doors from the doors table in it. Each room gets a designation as to a RH
room or a LH room. I then have a report that shows a room and all of the
doors in that room. However when a room designation changes from RH to LH, i
want all of the swings on the doors table to switch from RH to LH, or vica
versa. I basically need to know how to change values in a table (or possibly
create a new table with a maketable or append query) and then give values in
that table the opposite value RH vs LH. Here is a simple example. Room 1 RH
has the swings as shown, and Room 1 LH has the same doors however since it is
a LH instead of a RH, the swings for each door have changed. I hope someone
understands this. THanks.

Room 1 RH
Size Material Swing
1'6 A RH
2'0 A LH
2'6 A RH

Room 1 LH
Size Material Swing
1'6 A LH
2'0 A RH
2'6 A LH
 
K

KARL DEWEY

Use criteria as to which room in being switched over and update with this
expression ---
IIF([Swing]="RH","LH","RH")
This will reverse all [Swing] of the records meeting your criteria.

Do the same for the room RH/LH designation (You did not post the field name
that stores that information).
 
B

brownti via AccessMonster.com

Where should i put the criteria that you posted? Right now i have a large
database that has room numbers and the corresponding doors. i use an append
and delete query to move just the room that i want and the corresponding
doors to a new table then in that table i would like to change the swings so
that i am always keeping the original. i tried to do an update query with
the criteria in [Swing] but that didnt work. As you can see i am quite new
to Access. Thanks.

KARL said:
Use criteria as to which room in being switched over and update with this
expression ---
IIF([Swing]="RH","LH","RH")
This will reverse all [Swing] of the records meeting your criteria.

Do the same for the room RH/LH designation (You did not post the field name
that stores that information).
I have a table with information pertaining to some doors. The doors each
have a size, material and swing. I also have a rooms table that has various
[quoted text clipped - 20 lines]
2'0 A RH
2'6 A LH
 
B

brownti via AccessMonster.com

never mind, i got it
Where should i put the criteria that you posted? Right now i have a large
database that has room numbers and the corresponding doors. i use an append
and delete query to move just the room that i want and the corresponding
doors to a new table then in that table i would like to change the swings so
that i am always keeping the original. i tried to do an update query with
the criteria in [Swing] but that didnt work. As you can see i am quite new
to Access. Thanks.
Use criteria as to which room in being switched over and update with this
expression ---
[quoted text clipped - 9 lines]
 

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

Top