[RESOLVED] Unable to Change Property
I am trying to allow changes to our database through a timecard program. We use and Image database and I am using VS 2008. I am getting the error: (MDMDA) Unable to change property. The trouble shooting tip tell me "check the error code property of the exception to determine the HRESULT returned by the COM object." The error line is in bold.
If Not Trim(frmMantime.txtFunc1.Text) = "" And Not frmMantime.txtRec1.Text = "" Then
'Update Record
lngRecordNumber = frmMantime.txtRec1.Text
If ShopClock.ReadDirect(lngRecordNumber, "@") Then
ShopClock.item("FUNC-CODE") = frmMantime.txtFunc1.Text
ShopClock.item("START-TIME") = frmMantime.txtClock1.Text
If ShopClock.DBUpdate(1, "@") Then
MsgBox("Record was successfully Updated", MsgBoxStyle.OkOnly)
Else
MsgBox("Failed to update Record", MsgBoxStyle.OkOnly)
End If
Re: Unable to Change Property
1.) what is ShopClock exactly?
2.) Does this ShopClock object have a value property? (ie would ShopClock.Item("START-TIME").Value = frmMantime.txtClock1.Text work?)
Re: Unable to Change Property
1.) ShopClock is an object that was created to reference the "Shop-Clock" Database.
2.) When I add .Value onto the end of ShopClock.item("START-TIME") it returns "Public member 'Value' on type 'String' not found."
Re: Unable to Change Property
Ok, so I'm assuming then that the ShopClock.("XYZ") lines represent individual fields within this database, and this ShopClock object is a created class or is it just an object variable?
Re: Unable to Change Property
You are correct, it is individual fields within the "SHOP-CLOCK" database.
Re: Unable to Change Property
I figured it out. The database is formatted as "hhmm" and I completely forgot to reformat the time from hh:mm. Thanks for your help.