John-
I forgot to explain why I copy ditanceToCityCenter.. The time I create a group booking record, We suppose to have a preoccupied idea that we may book hotels in city center for each cities. Then I would pass the first DistanceToCenter to each city, then my colleagues will work on cities which are in their area. Then they might find it difficult to book cheap hotels in center, then they will change the distance accordingly themselves... And the distance will also determin the budget. The first distance input will get the budget rate, which will be recorded for later comparison with the final hotel rate. I hope I am not doing the wrong thing.
Best Regards,
Kevin
在 zhaoliqingoffice <zhaoliqingoffice@163.com>,2015年11月5日 下午4:57写道:
John-
The first one will record client's original request, the second one will copy data from first one, and later it will be changed according to the number of rooms cancelled or added. You know the tour group size are always changing. We need to keep the record so that we can compare... In this case I need update sql. Please help. Thanks in advance.
Best Regards,
Kevin
在 "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>,2015年11月5日 下午3:52写道:Kevin-
Why are you duplicating the field in a second table? Except for key values, a value should appear in your database only once.John Viescas, AuthorMicrosoft Access 2010 Inside OutMicrosoft Access 2007 Inside OutMicrosoft Access 2003 Inside OutBuilding Microsoft Access ApplicationsSQL Queries for Mere Mortals(Paris, France)
On Nov 5, 2015, at 4:28 AM, 'zhaoliqingoffice@163.com' zhaoliqingoffice@163.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:I did somthing like this myself. But nothing happend after running. And I checked the debug.print strSQL, there's no error notes either.Dim strSQL As String
strSQL = "UPDATE tblPartItineraryCityTour" & _
"SET [HotelDistanceToCityCenter] = " & Me.Parent.HotelDistanceToCityCenter & "," & _
"[HotelCategoryID] = " & Me.Parent.HotelCategoryID & _
"WHERE PartItineraryCityTourID = " & Me.Parent.PartItineraryCityTourID
CurrentDb.Execute strSQLOne, dbFailOnError
Date: 2015-11-05 08:21Subject: RE: [MS_AccessPros] Fill up something instead of add new recordKevin,
This is probably a simple update query. Can you provide some information about your primary keys? Is GroupBookingID a primary key in one of the tables?
Duane Hookom, MVP
MS Access
To: ms_access_professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Thu, 5 Nov 2015 07:41:55 +0800
Subject: [MS_AccessPros] Fill up something instead of add new record
Dear All-Is that possible to fill up an existing record with some field from other table or form with strSQL, instead of insert a new record? For example:An existing record from tblCityTourtblCityTourCityTourID: 11GroupBookingIDCityTourDate: 11-Nov-2015HotelStarID: (field I want to fill up)The table from which I want to get HotelStartID.tblGroupBookingGroupBookingID: 2ClientID: 5HotelStarID: 3Is that possible to fill up HotelStartID with the one from tblGroupBooking? Thanks in advance.Best Regards,Kevin
__._,_.___
Posted by: zhaoliqingoffice <zhaoliqingoffice@163.com>
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (7) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar