S
Scott A
Method 'Value' of object '_Textbox' failed
I am getting this error when using my application on
machines other than the one used for development. I've
verified all of the libraries in use, as well as the
location of each, and they are identical. The libraries
I'm using (in Access 2000) are:
VBA
MS Access 9.0
MS DAO 3.6
MS ADO 2.1
OLE Automation
MS Calendar Control 9.0
The error occurs when running a before update event on a
form. The code I'm working with (from the Access
Cookbook) is designed to write the key field of the new
record, assigning it a value from a counter. The public
function referenced (acbGetCounter()) uses DAO.
I've called out (#) the line highlighted by the debugger
for reference:
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Try to get a unique counter and write it
'to the EqID field.
Dim lngCounter As Long
If IsNull(Me!EqID) Then
lngCounter = acbGetCounter()
' If no counter is available...
If lngCounter < 1 Then
'cancel the Update event.
Cancel = True
Else
'Write the key field.
#####Me!EqID = "EQ0" & lngCounter#####
End If
End If
End Sub
I searched the knowledge base for any information on this
error, but only came across this:
http://support.microsoft.com/default.aspx?scid=kb;en-
us;199113&Product=acc
Similar error number, but the method and object described
in the article are not the same. Still wondering what it
means to use the 'MSDatashape provider to create a
hierarchical recordset, and then assign the recordset to a
subform'
I've been reading as much as I can to try and resolve what
may be reference errors, and am thinking that this form
may contain some ambiguities, but I'm not understanding if
and how they can be resolved.
Anybody know how to fix this?
Thanks,
Scott A
I am getting this error when using my application on
machines other than the one used for development. I've
verified all of the libraries in use, as well as the
location of each, and they are identical. The libraries
I'm using (in Access 2000) are:
VBA
MS Access 9.0
MS DAO 3.6
MS ADO 2.1
OLE Automation
MS Calendar Control 9.0
The error occurs when running a before update event on a
form. The code I'm working with (from the Access
Cookbook) is designed to write the key field of the new
record, assigning it a value from a counter. The public
function referenced (acbGetCounter()) uses DAO.
I've called out (#) the line highlighted by the debugger
for reference:
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Try to get a unique counter and write it
'to the EqID field.
Dim lngCounter As Long
If IsNull(Me!EqID) Then
lngCounter = acbGetCounter()
' If no counter is available...
If lngCounter < 1 Then
'cancel the Update event.
Cancel = True
Else
'Write the key field.
#####Me!EqID = "EQ0" & lngCounter#####
End If
End If
End Sub
I searched the knowledge base for any information on this
error, but only came across this:
http://support.microsoft.com/default.aspx?scid=kb;en-
us;199113&Product=acc
Similar error number, but the method and object described
in the article are not the same. Still wondering what it
means to use the 'MSDatashape provider to create a
hierarchical recordset, and then assign the recordset to a
subform'
I've been reading as much as I can to try and resolve what
may be reference errors, and am thinking that this form
may contain some ambiguities, but I'm not understanding if
and how they can be resolved.
Anybody know how to fix this?
Thanks,
Scott A