Hello! I have built a database to track tile information. The first form is a Client/Project information form and the ID number is an auto-number so as soon as they start typing the Clients name the number is assigned. When they get to the Tile Information section they click a button that takes them to a form that saves all the different tile samples that are checked out by a particular client. The TileID box is actually set up as a text box so the sales person can enter the same ID number as is on the Client/Project form they are in the middle of filling out. This will keep the correct tile information with the correct Client/Project.

I put this code in the OnOpen event of the TileInfo form:


Private Sub Form_Open(Cancel As Integer)

'Openargs ="TileID='" & Me.ProjectID & "'"

Dim stDocName As String
stDocName = "frmTileInfo"
DoCmd.OpenForm stDocName, OpenArgs:=Me.ProjectID

End Sub

When I click the Enter Tile Information button it goes to the debugger giving an error message saying "Method Or Data Member Not Found" and highlights "Private Sub Form_Open(Cancel As Integer)" in yellow and then highlights ".ProjectID" in blue. I've checked all the forms and everything is named right and not misspelled so I'm stuck as to what is causing the error.

This is what the help window said about the error:

This error occurs when an event has failed to run because the location of the logic for the event cannot be evaluated. For example, if the OnOpen property of a form is set to =[Field], this error occurs because a macro or event name is expected to run when the event occurs.

I have macro's set to open the form - in add mode on the initial Client/Project form and in edit mode on the Edit Client/Project form. Are these macro's causing the problem? If so then how do I open the form if i can't have a macro?

Thanks for any help someone can give me.

Laura