poohbear2012
Registered User.
- Local time
- Today, 13:57
- Joined
- Jan 8, 2012
- Messages
- 30
I am encountering a Run-Time Error 3127, when closing a form within my database the Run-Time error states:
"The INSERT INTO statement contains the following unknown field name: 'ref_GP_Name'. Make sure you have typed the name correctly and try the operation again"
I have checked the spelling of the field name and it is correct.
The coding that I have within the VBA for the form is:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Triaged = True Then
Dim db As Database
Set db = CurrentDb
db.Execute "INSERT INTO [tbldemochanges] " _
& "SELECT * FROM [tbldemography] " _
& "WHERE [tbldemography].[patient_id] =" & Me.patient_id & ";"
Set db = Nothing
Else
End If
End Sub
Any help in resolving this error would be gratefully appreciated.
"The INSERT INTO statement contains the following unknown field name: 'ref_GP_Name'. Make sure you have typed the name correctly and try the operation again"
I have checked the spelling of the field name and it is correct.
The coding that I have within the VBA for the form is:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Triaged = True Then
Dim db As Database
Set db = CurrentDb
db.Execute "INSERT INTO [tbldemochanges] " _
& "SELECT * FROM [tbldemography] " _
& "WHERE [tbldemography].[patient_id] =" & Me.patient_id & ";"
Set db = Nothing
Else
End If
End Sub
Any help in resolving this error would be gratefully appreciated.