Unanswered: access computed field behaves differently in runtime
I am using access 2010
I have an unbound textbox whose value is computed as the sum of a cross query column.
I need to check the value of this field in vba code to compute the value of some other fields.
In access 2010 it works perfectly while when I distribute it on some other computers(using the runtime), it fails.
The field value is always 0 before I run the vba code, so wile the value is then correct (the form do actually display the real sum), the vba code runs with an erroneous value of 0
I have tried to put a Me.txt_totaltime.Requery before running the vba code, but here again while it works in acess 2010, it fails in the runtime environement, where my form does not even open anymore without any errors what so ever (the runtime computer is very slow, could it be it?)
I have tried many thing, but none of my attemps have been successfull, and I have not found any similar issue on the web
Hi thanks for the help.
I tried the Dsum function but it does not seem to work on cross query.
I am sorry I did not explain everything.
Indeed the text box [txt_dailytime] is actually [txt_dailytime_01] with the 2 ending digit representing the day.
The cross query tab outputs a table with a column for every day of the month.
When I try a Dsum using the column headings, it does not work
Dim index As string
for i = 1 to 31
if i<10 Then
index = "0" & i
index = i
Set ctlDailytime=Me.Controls("txt_dailytime_" & index)