First of all, sorry guys for this perhaps uncomplete post.
Please forgive me but I was interrupted at the time of writing this.
Ok, I already did print out the messagebox but as I said, I got interrupted in writing this post.
Here is further information, thanks for your patience.
the messagebox result:
INSERT INTO Related_Entries (Related_To_Id,Related_To_Number,Related_From_Id,Related_From_Number,”Desc”)
VALUES (‘1039669’,’0’,’040603005910960349966C’,’2’,’Contractor’);
There are no errors in the data!
this is the code for executing the query using ADO:
strUpdate = "INSERT INTO Related_Entries (Related_To_Id," & _
"Related_To_Number,Related_From_Id," & _
"Related_From_Number,""Desc"") " & _
"VALUES ('" & objMaxRec.GetFieldValue("IDentification") & "'," & _
"'" & objMaxRec.GetFieldValue("Contact_Number") & "'," & _
"'" & dgContacts.Columns(3) & "'," & _
"'" & dgContacts.Columns(4) & "'," & _
"'" & relationType & "');"
Dim updateConnection As New adodb.Connection updateConnection.Open "DEMElocal", "MASTER", "cheers"
Dim updateCommand As New adodb.Command
With updateCommand
.ActiveConnection = updateConnection
.CommandText = strUpdate
.CommandType = adCmdText
End With
updateCommand.Execute
HOWEVER, could it be that the error in assignment might be related to the following?
The table contains some system generated fields that are automatically filled in when working with the product's interface.
When I'm doing this with a VB form, I actually have no idea if these fields are filled in too. However they are read only and I cannot change the field's properties.
PERHAPS now a stupid question, but fredericofonseca:
how can I catch the error string containing the offending constant?
Again, my apologies for my previous post.
I hope you guys can still help me.
Regards,
Ruben.