Before I read your last post I managed to compile the database by changing my code to this:
I then tried to call the function using Start_Date after update event but got the debugger highlighting
The example I used was the LDate example as it seemed to more closely match what I was trying to do. Can you be more specific about the syntax? Am I even on the right lines?
Code:
Function LastHol()
Dim startdate As Date
Dim Name As String
startdate = Forms!Resourcing!Start_Date
Name = Forms!Resourcing!Trainer_Name
Forms!Resourcing!Last_Hol = DLookup("[Start_Date]", "Hours Holiday_P1", [Trainer_Name] = Name And [Start_Date] < startdate)
End Function
Code:
startdate = Forms!Resourcing!Start_Date
The example I used was the LDate example as it seemed to more closely match what I was trying to do. Can you be more specific about the syntax? Am I even on the right lines?