For some reason this code is leaving the database "open" so I can't save anything and have to restart Access. The record is created correctly and it doesn't go to trans_err. Can't see what I've got wrong but it's after 3AM so it's probably really stupid.
Code:
'Do transactions
DAO.DBEngine.BeginTrans
On Error GoTo trans_Err:
'Create the Invoice
sql = "Insert into [tblInvoices] (InvNumber, InvContactID, InvType, InvDate, InvAmount, InvGST, InvPST, InvNotes) "
sql = sql & "Values (" & Me.InvNumber & ", " & Me.InvContactID & ", 'Bill', #" & Me.InvDate & "#, "
sql = sql & Amount & ", " & Me.InvGST & ", " & Me.InvPST & ", '" & Me.InvNotes & "')"
CurrentDb.Execute sql, dbFailOnError
DAO.DBEngine.CommitTrans
Exit Sub