Thanks again.
On the onopen event of the form I have this:
Private Sub Form_Open(Cancel As Integer)
Dim stDocName As String
Dim db As DAO.Database
Dim strSql As String
Set db = DBEngine(0)(0)
strSql = "DELETE FROM Transfer;"
db.Execute strSql, dbFailOnError
DoEvents
End Sub
I have a button on the form that passes the table content into a temporary table "Transfer"
Private Sub Command24_Click()
On Error GoTo Err_Command24_Click
Dim stDocName As String
Dim db As DAO.Database
Dim strSql As String
Set db = DBEngine(0)(0)
strSql = "DELETE FROM Transfer;"
db.Execute strSql, dbFailOnError
DoCmd.SetWarnings False
stDocName = "TranferTXmaster"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.SetWarnings True
Forms!Form3!SubformCompilations.Requery
Exit_Command24_Click:
Exit Sub
Err_Command24_Click:
MsgBox Err.Description
Resume Exit_Command24_Click
End Sub
The transfer code refers to a query:
INSERT INTO TRANSFER ( Barcode, TXID, SeriesName, EpisodeTitle, Typeofmaterial, TapeStandard, Noofparts, Audio1, Audio2, Audio3, Audio4, Subtitles, SportorSports, Competition, Stageofcompetition, EventDate, Venue, ContractName, ClipRights, PromoRights, LicenceStart, LicenceEnd, Territories, AdditionalInformation )
SELECT TXMASTERS.Barcode, TXMASTERS.TXID, TXMASTERS.SeriesName, TXMASTERS.EpisodeTitle, TXMASTERS.Typeofmaterial, TXMASTERS.TapeStandard, TXMASTERS.Noofparts, TXMASTERS.Audio1, TXMASTERS.Audio2, TXMASTERS.Audio3, TXMASTERS.Audio4, TXMASTERS.Subtitles, TXMASTERS.SportorSports, TXMASTERS.Competition, TXMASTERS.Stageofcompetition, TXMASTERS.EventDate, TXMASTERS.Venue, TXMASTERS.ContractName, TXMASTERS.ClipRights, TXMASTERS.PromoRights, TXMASTERS.LicenceStart, TXMASTERS.LicenceEnd, TXMASTERS.Territories, TXMASTERS.AdditionalInformation
FROM TXMASTERS
WHERE (((TXMASTERS.ID1)=[Forms]![Form3].[Form].[ID1].[Caption]));
And thats it, Regards