hhzyousafi
Registered User.
- Local time
- Tomorrow, 03:16
- Joined
- Nov 18, 2013
- Messages
- 74
I have been stuck on this for the past couple of days and it seems I am getting absolutely nowhere. I am having an extremely difficult time calculating values which seem, for the most part, very straight forward. I have done quite a bit of debugging and I have been able to isolate the issue to the following code:
A little background behind this code is I have a table called "tblTasks" and another table called "tblTaskHistory". "tblTasks" and "tblTaskHistory" have a one to many relationship. There is a field in "tblTasks" called "txtActualManHours" and that field shows on the current form - a form that is bound to the table "tblTaskHistory". All I am trying to do is increment the parent table field "txtActualManHours" with the value in the field with the same name in the table "tblTaskHistory". I have been able to pass values for strings without any issues using VBA; however these values are currently stored as "Double" and Access keeps giving me an error.
'If txtActualManHours.Visible = True Then
'ActualManHourstblTaskHistory = txtActualManHours.Value
'ActualManHourstblTasks = txtActualManHourstblTasks.Value
'txtActualManHourstblTasks.Value = ActualManHourstblTasks + ActualManHourstblTaskHistory
'Else
'End If
'ActualManHourstblTaskHistory = txtActualManHours.Value
'ActualManHourstblTasks = txtActualManHourstblTasks.Value
'txtActualManHourstblTasks.Value = ActualManHourstblTasks + ActualManHourstblTaskHistory
'Else
'End If
A little background behind this code is I have a table called "tblTasks" and another table called "tblTaskHistory". "tblTasks" and "tblTaskHistory" have a one to many relationship. There is a field in "tblTasks" called "txtActualManHours" and that field shows on the current form - a form that is bound to the table "tblTaskHistory". All I am trying to do is increment the parent table field "txtActualManHours" with the value in the field with the same name in the table "tblTaskHistory". I have been able to pass values for strings without any issues using VBA; however these values are currently stored as "Double" and Access keeps giving me an error.