Manipulating SharePoint choice(lookup) field in VBA

ScottK1396

Registered User.
Local time
Today, 03:22
Joined
Jul 28, 2011
Messages
20
I am maintaining a database using SharePoint, with an Access frontend, custom SP views and a backend Access for maintenance. Two fields of type Choice allow the user to list software load using checkboxes. Separated into (Win7x64)Compatible and Incompatible, they help determine if we can refresh/upgrade a user now, or wait for app issues to be fixed. I allowed the multi-value fields to happen because the techs wanted to leverage SharePoint more directly, and wanted data to be contained in a single list. Being new to SharePoint, I didn't see the trouble.

The big problem I run into is I cannot find a method to 'uncheck' values automatically in Access. This works if the lookup is in a local Access table, but not in SharePoint. I can query on [software.value] and get a breakout by Title, but then I have to go into the record, open the field's combobox in the datasheet and deselect the title. I see no means for Access to go through and uncheck those fields individually.

Simply put, while I can run a query on [Computername] and [software.value] and get a separate row for each Computername-Title, I cannot then select and delete the individual row. Access complains about the resultset is read-only (as opposed to 'recordset not updatable', which I know why that happens). Again, this is in contrast to Access' ability to delete values lieka regular row when local.

Is there a sort of 'Value.Deselect' method I can't find? If there a clear reference out there, lead me to it. There's got to be a volume on interacting with SharePoint in Access VBA that I'm not finding. There are a lot of places that cover the basics that don't cover this topic.

I'm using SP2007, Access2007 for the user app, but maintaining using Access 2010. We're moving to SP2010 by EOY and Off2010 by Q1.


Scott

Sorry for the rookie question. After years of using Access for data analysis this is my first serious application. Been doing a lot of learning as I go.
 
Take a look at this link:
http://allenbrowne.com/ser-42.html

There is some VBA code being used to return each value from a multi-value list. This might shed a little light on the subject.

Looking at the code in the link above you may be able to adapt the VBA code to iterate through the records of the multi-value field and manage each value.

Let me know how you come out. I am also supporting SharePoint 2010 lists using Access (2010) and have run into some very interesting situations.
 

Users who are viewing this thread

Back
Top Bottom