I am designing a database to add greetings card verses to a database.
Attached is the relationship between the tables.
I have writen an Event procedure, but it says 'Invalid Operation' (Error Number 3219) in the following code on the strSQL line:
I am not very experience with Visual Basic, so I am not sure if the syntax is correct.
Can anyone see what I am doing wrong?
Attached is the relationship between the tables.
I have writen an Event procedure, but it says 'Invalid Operation' (Error Number 3219) in the following code on the strSQL line:
Code:
Private Sub Cmd_Add_Rec_Click()
Dim dbs As Database
Dim strSQL As String
Set dbs = CurrentDb
strSQL = "INSERT INTO `Verses` (`EventID`, `MoodID`, `Verse`) VALUES ('Forms.[AddRecords]![Cbo_Event_Type]','Forms.[AddRecords]![Cbo_Mood_Type]','Forms.[AddRecords]![Txt_Verse]')"
Set rsSQL = dbs.OpenRecordset(strSQL, dbOpenDynaset)
Debug.Print "Recordsets"
End Sub
Can anyone see what I am doing wrong?