I have an issue with calling a private function in a form from another form. I have never done this before and I am guessing it has something to do with the function being private. What is happening is a user searches for a value in [BoxNo] and clicks a button (Send2Edit). Then the button opens a new form, fills in the value of [BoxNo] in [number] of the DataEntry Form and then closes the original form "SearchContents". My data won't compile at the Call function. Does anyone know how I get this to work? I am very new to the VBA world. Thank you for your help.
Code:
Private Sub send2edit_Click()
DoCmd.OpenForm "DataEntry", acNormal
[Forms]![DataEntry].[number] = Me.BoxNo
Call [Forms]![DataEntry].[search]
DoCmd.Close acForm, "SearchContents"
End Sub