M
Marc
This works perfectly ion Access 2000, no so in access 2003 & 2007: can
somebody help me with that?
Dim cn As ADODB.Connection
Dim db As Database
Dim rs As Recordset
On Error GoTo fout
Set db = CurrentDb
Set cn = CurrentProject.Connection
'Set rs = db.OpenRecordset("Raadplegingen")
Set rs = New ADODB.Recordset
rs.Open "Raadplegingen", cn, adOpenDynamic, adLockOptimistic
DBEngine.BeginTrans
rs.AddNew
rs!raadplegingsdatum = Date
rs!raadplegingstijd = Time
rs!Gebruiker_ID = Gebruikers_ID
rs!Computer_naam = Computer
Computer = Right(Computer, 8)
rs!login_datum = login_datum
rs!login_tijd = login_tijd
rs!Patiënt_ID = Me.Dossiernummer
rs.Update
DBEngine.CommitTrans
hernemen:
Exit Function
fout:
Select Case Err.Number
Case Else
MsgBox Err.Number & ": " & Err.Description, vbOKOnly,
"Dossier_CMD_Click"
Resume hernemen
End Select
Many thanks,
Marc
somebody help me with that?
Dim cn As ADODB.Connection
Dim db As Database
Dim rs As Recordset
On Error GoTo fout
Set db = CurrentDb
Set cn = CurrentProject.Connection
'Set rs = db.OpenRecordset("Raadplegingen")
Set rs = New ADODB.Recordset
rs.Open "Raadplegingen", cn, adOpenDynamic, adLockOptimistic
DBEngine.BeginTrans
rs.AddNew
rs!raadplegingsdatum = Date
rs!raadplegingstijd = Time
rs!Gebruiker_ID = Gebruikers_ID
rs!Computer_naam = Computer
Computer = Right(Computer, 8)
rs!login_datum = login_datum
rs!login_tijd = login_tijd
rs!Patiënt_ID = Me.Dossiernummer
rs.Update
DBEngine.CommitTrans
hernemen:
Exit Function
fout:
Select Case Err.Number
Case Else
MsgBox Err.Number & ": " & Err.Description, vbOKOnly,
"Dossier_CMD_Click"
Resume hernemen
End Select
Many thanks,
Marc