M
Meg
Is it possible to make your code pause to wait until the
preceding step has been fully completed before moving to
the next line?
I am running the following code:
Private Sub Expenditure_AfterUpdate()
Dim CalculatedActivityCost As Currency
Me.Requery
CalculatedActivityCost = Me.TaskTotalExpenditure
MsgBox CalculatedActivityCost
Forms![Project Details]![Project Deliverables
Subform].Form![Cost] = Me.TaskTotalExpenditure
End Sub
Problem is that the msgbox (and my subform field) displays
a null becuase the database is still undergoing the
requery.
This problem only occurs on my laptop - not my desktop
(which itself is strange since my laptop has a faster chip
and more ram?!)
Alternatively I could retrieve the value I need via SQL,
but I dont know how to get the code to do this!
Any suggestions greatly appreciated!!
Thanks
preceding step has been fully completed before moving to
the next line?
I am running the following code:
Private Sub Expenditure_AfterUpdate()
Dim CalculatedActivityCost As Currency
Me.Requery
CalculatedActivityCost = Me.TaskTotalExpenditure
MsgBox CalculatedActivityCost
Forms![Project Details]![Project Deliverables
Subform].Form![Cost] = Me.TaskTotalExpenditure
End Sub
Problem is that the msgbox (and my subform field) displays
a null becuase the database is still undergoing the
requery.
This problem only occurs on my laptop - not my desktop
(which itself is strange since my laptop has a faster chip
and more ram?!)
Alternatively I could retrieve the value I need via SQL,
but I dont know how to get the code to do this!
Any suggestions greatly appreciated!!
Thanks