I have a form that list company names, all the records have a button called view. The button opens the projects that are a part of the company.
Here is the code for the button
On Error GoTo ToggleLink_Click_Err
If ChildFormIsOpen() Then
This part works fine. It is filtering the projects that belong only to the company i pick
But i am trying to add a new button on this form that will bring up that project # in my project # form so i can edit it? how can i do this.
I was trying
Private Sub Command3_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "New_Project"
stLinkCriteria = "[Project #]=" & "'" & Me![Project #] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Form![New_Project]![Project #].Visible = True
but that prompted my for a project # then errored out.