Question : Error in report vba

Hi,

I want this (see code), how to do that?
Or... can this be done with a dlookup in the report?

Thanks,
HP
Code Snippet:
1:
2:
3:
Private Sub Report_Load()
  Me.KlantNaam.value = SELECT Klanten.naam FROM Klanten WHERE (((Klanten.ID)=[Forms]![Project]![Klantnummer]));
End Sub

Answer : Error in report vba

=dlookup("naam", "Klanten","Klanten.ID=[Forms]![Project]![Klantnummer]")

Gary
Random Solutions  
 
programming4us programming4us