I'm updating a linked SharePoint list (name: "Business Supports") through an Access Form via a query.
The SharePoint list has a lookup to another linked SharePoint list (name: "Business Capabilities") on the site and this is a combo box on the form.
When I try to add a new record without selecting the optional "Business Capability" I get the error:
Run-time error '3101':
The Microsoft Access database engine cannot find a record in the table 'Business Capabilities' with key matching field(s) 'Business Capability'.
When debugging, I can see that the field is null, which makes perfect sense to me.
If I try to update an existing record by clearing the combo box value, I get the following (before even trying to save the record):
You tried to assign the Null value to a variable that is not a Variant data type.
Since the value is optional, I need to be able to leave it blank (or null)...
Note: This works fine when I make the insert or update directly in the linked Access table!
Have I made a design error in the form? Any ideas?
UPDATE:
I found my stupid mistake 5 minutes after my (first) post: The query had an inner join instead of a left outer between the linked tables.
The SharePoint list has a lookup to another linked SharePoint list (name: "Business Capabilities") on the site and this is a combo box on the form.
When I try to add a new record without selecting the optional "Business Capability" I get the error:
Run-time error '3101':
The Microsoft Access database engine cannot find a record in the table 'Business Capabilities' with key matching field(s) 'Business Capability'.
When debugging, I can see that the field is null, which makes perfect sense to me.
If I try to update an existing record by clearing the combo box value, I get the following (before even trying to save the record):
You tried to assign the Null value to a variable that is not a Variant data type.
Since the value is optional, I need to be able to leave it blank (or null)...
Note: This works fine when I make the insert or update directly in the linked Access table!
Have I made a design error in the form? Any ideas?
UPDATE:
I found my stupid mistake 5 minutes after my (first) post: The query had an inner join instead of a left outer between the linked tables.
Last edited: