August 3, 2007

Microsoft Access 2007 MS_WSSTemplateID bug

Strange error when trying to use a subform inside an Access form to the effect of:

SELECT*,sql_variant_property(value,'basetype') AS type FROM

Try to minimize the ribbon.
If the ribbon is minimized Access12 doesn't send the bugged query. Makes no sense, but works.


Erik Renberg said...

Mimizing the ribbon makes the error message disappear, but at least for me the subform still doesn't work:

In my case the subform has a combo box in one column, where I select between different items. But the problem is in Access 2007 I can't select the item (the drop down/combo never disappears). The same works fine in Access 2003.

I also posted about this in the newsgroup microsoft.public.access.forms in the thread "Error Message when creating new records on a subform Options" from May 3 2007.

/ Erik

Anonymous said...

OK, I had the same problem and ended up creating my subform from scratch again. After lots of fiddling and frusration I have realised the following: The bug only occurs if the datasource for the subform includes a join to a foreign key table.

i.e. My form/subform was a typical Order/Order Detail setup.

Subform Datasource was
SELECT odtOrder, odtProduct, odtUnitPrice, odtQuantity, odtDiscount, prdTitle
FROM tOrderDetail INNER JOIN tProduct ON odtProduct = prdKey
ORDER BY odtOrder, prdTitle

Select Product Combo Box on Subform Datasource was
SELECT prdTitle, prdKey
FROM tProduct
ORDER BY prdTitle

If you remove the join to the table "tProduct" from the Subform Datasource the bug is eliminated


Erik Renberg said...

Office 2007 SP2 was released yesterday. After installing it I though I should re-test this old bug (allthough Michelles workaround worked fine for me).

And quick testing indicates that indeed SP2 did fix this problem and that joins to a foreign table now are OK.

So it may be worth while to try SP2 if you still have this issue.

/ Erik