Hi,
I'm new to this so please be kind
I am helping to develop a database ("Project DB") at work to help track dates for works on various sites (various actual dates and a selected few forecast dates for major milestones). I have the tables set up OK and I've created some forms as well to make it easier to input the data.
On one of the forms (in form view), I have the BeforeUpdate function assigned to the fields related to forecast dates. When a forecast date is updated, "Yes" is inserted into a field called "ForecastsUpdated":-
Private Sub Survey_Forecast_BeforeUpdate(Cancel As Integer)
ForecastsUpdated = "Y"
End Sub
Private Sub Planning_Forecast_BeforeUpdate(Cancel As Integer)
ForecastsUpdated = "Y"
End Sub
Private Sub Completion_Forecast_BeforeUpdate(Cancel As Integer)
ForecastsUpdated = "Y"
End Sub
This works fine on the form in form view but if I put this function on a field in a form in datasheet view I get an error:-
The expression Before Update you entered as the event property setting produced the following error: A problem occurred while Project DB was communicating with the OLE server or ActiveX Control.
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]
* There may have been an error evaluating the function, event, or macro
Can you let me know what I am doing wrong?
Cheers