Jumat, 30 Oktober 2015

Re: [MS_AccessPros] Run an append query automatically

 

By the way, I did something like this, it didn't work out. What's wrong with my code? Thanks.

Dim strSQL As String

If IsNull(ELookup("PartItineraryCityTourBookingRoomID", "tblPartItineraryCityTourBookingRoom", "PartItineraryCityTourID=" & PartItineraryCityTourID)) Then

strSQL = "INSERT INTO tblPartItineraryCityTourBookingRoom (RoomTypeID, NumberOfRooms,)" & _
"SELECT tblGroupBookingRoom.RoomTypeID, tblGroupBookingRoom.NumberOfRooms" & _
"FROM tblGroupBookingRoom WHERE GroupBookingID=Me.Parent.GroupBookingID" & "," & PartItineraryCityTourID

CurrentDb.Execute strSQL, dbFailOnError

End If


Regards,
Kevin Zhao
 
Date: 2015-10-31 06:57
Subject: [MS_AccessPros] Run an append query automatically
 

Dear All,
Is that possible to click on a command button run an append query automatically without pop up windows. For example:

source table: tblBooking
BookingID Roomtype NumberOfRooms

Destination table: tblCityRoomBooking
CityRoomBookingID CityTourID RoomType NumberOfRooms

By cliecking on a command button on the frmCityTour, I want to append "RoomType, NumberOfRoom" into tblCityRoomBooking, and I hope the "CityTourID" will be filled according to "CityTourID" from frmCityTour. 

Can this be done? Thanks.
Best Regards,
Kevin


Regards,
Kevin Zhao

__._,_.___

Posted by: "zhaoliqingoffice@163.com" <zhaoliqingoffice@163.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar