Some issues:
1. You shouldn't use special characters like / in table names - HOTEL/PEOPLE
2. Name is an access reserved word. Change to e.g. FullName
3. Your Hotel/People count should have separate records for each count e.g.
Code:
ID |
Hotel |
Age |
Num_Days |
People |
TypeOfRoom |
1 |
Samaria |
Adult |
7 |
0 |
|
2 |
Samaria |
Infant |
7 |
0 |
|
3 |
Samaria |
Adult |
14 |
2 |
|
4 |
Samaria |
Adult |
14 |
0 |
|
I've included TypeOfRoom in the above but it might be better as a separate table with fields Hotel ; TypeOfRoom
The best solution would be to append those records to the correct hotel in the first place
i.e. setup filter conditions for type of room in the initial append query
If Hotel Like SantaMarina* And (TypeOfRoom = 'DV1' or TypeOfRoom ='DRS') Then
Hotel = 'Santa Marina B'
Else
Hotel = 'Santa Marina P'
End If
If not done like that, good database design would prevent them being added to the wrong hotel
However, assuming you've already added them to Santa Marina P, then the update query should look something like this
Code:
UPDATE [Hotel/People] SET [Hotel/People].Hotel = 'Santa Marina B' WHERE ((([Hotel/People].Hotel)='Santa Marina P') AND (([Hotel/People].TypeOfRoom)='DV1' Or ([Hotel/People].TypeOfRoom)='DRS'));
BTW the hotel names are familiar - is this Sorrento?
EDIT: I wrote the above based on post 1 - didn't see post 2 till I'd finished mine so haven't referred to that