[AccessD] Problem with combo box audit

Charlotte Foust cfoust at infostatsystems.com
Tue Sep 18 19:07:32 CDT 2007


Unbound controls don't have an .OldValue property.  Could that be what
you're running into?  Otherwise, it may be because the OldValue of the
combo is null, and you can't compare anything to Null.

Charlotte Foust 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Tuesday, September 18, 2007 4:49 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Problem with combo box audit

I receive an error when I add acCombo Box to the If conditions: 

If .ControlType = acTextBox Or .ControlType = acOptionGroup Or
.ControlType
= acComboBox Then       	If .Value <> .OldValue Then

Help says the following:

"Operation is not supported for this type of object. (Error 3251) 

You were attempting to execute a method or assign a value to a property
that is usually valid for the object, but is not supported in this
specific instance. For example, the Edit method is generally valid for
Recordset objects, but not for a snapshot-type Recordset. This error
could also occur in cases where the operation is not permitted due to
the type or status of the object - as when trying to use the
MovePrevious method on a forward-only-type Recordset. Some operations
are also not supported, depending on if you are accessing a Microsoft
Access database engine or an ODBC data source."

I have no clue why a combo box can't support Value or OldValue -- anyone
run into this before? I'm stumped. If I remove the check for a combo, it
works fine everytime. I'm running this from the form's BeforeUpdate
event. 

Susan H. 

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list