Hi everybody.
I'm trying to write a query for an insert, but when I click the button, I have an error 3067...
This is my code:
Private Sub bInserisci_Click()
Dim query As String
query = "insert into prova (data_ora, id_puntoMisura, id_obis, valore) "
query = query & "values ('" & Me.record_dataOra & "', "
query = query & "(select id_puntoMisura from puntomisura where puntoMisura='" & Me.record_puntoMisura & "'), "
query = query & "(select id_obis from obis where obis='" & Me.record_obis & "'), " & Me.record_punta & ");"
DoCmd.RunSQL query
End If
End Sub
Anybody can help me?
Thx for any suggestions.
Greetings.
I'm trying to write a query for an insert, but when I click the button, I have an error 3067...
This is my code:
Private Sub bInserisci_Click()
Dim query As String
query = "insert into prova (data_ora, id_puntoMisura, id_obis, valore) "
query = query & "values ('" & Me.record_dataOra & "', "
query = query & "(select id_puntoMisura from puntomisura where puntoMisura='" & Me.record_puntoMisura & "'), "
query = query & "(select id_obis from obis where obis='" & Me.record_obis & "'), " & Me.record_punta & ");"
DoCmd.RunSQL query
End If
End Sub
Anybody can help me?
Thx for any suggestions.
Greetings.