I'm trying to populate an undound text box on a report and here's the code that I have that's not working. I keep getting a Compile Error: Method or Data Member not found. Here's the code, hope you can help....
Code:
Public Function FillGeneral()
Dim rs As Recordset
Dim db As Database
Dim str As String
str = "SELECT tbl_Structure.ProjectID, " _
& "tbl_Structure.ContractorID " _
& "FROM tbl_Structure WHERE (((tbl_Structure.ParentContractorID) " _
& "Is Null));"
Set db = CurrentDb()
Set rs = db.OpenRecordset(str, dbOpenDynaset)
rs.MoveFirst
rs.FindFirst "= ProjectID" & Reports![report1]![ProjectID]
FillGeneral = rs![ContractorID]
End Function