Hi,
I need help especially reading forum answers for this type of question and still cannot do it.
I have the first form open "Form_Customer" with a button on it called "Create Order".
when I click on the button I want to open the "Form_Orders" form. (this I managed.)
On opening the Form_Orders I require the [Title] , [CName], [Address] , [Postcode] from the first form to autoappear in the orders form. The table names are the same in both forms.
On Form_Customer In the Click() for Create order button, I have the following code:
Private Sub CreateOrder_Click()
DoCmd.OpenForm Form_Orders, , , , acFormAdd, , Me.Title & "$" & Me.CName
End Sub
In load of Form_Orders I have:
Private Sub Form_Load()
If Me.NewRecord Then
Me.Title = Split(Me.OpenArgs, "$")(0)
Me.CName = Split(Me.OpenArgs, "$")(1)
End If
End Sub
Can anyone please advise why does this not work.... On another post this code was there and the guy said it worked. ?? I do not understand the programming at all really....so no comprehension of why it doesn't work....
Many thanks
Brian
I need help especially reading forum answers for this type of question and still cannot do it.
I have the first form open "Form_Customer" with a button on it called "Create Order".
when I click on the button I want to open the "Form_Orders" form. (this I managed.)
On opening the Form_Orders I require the [Title] , [CName], [Address] , [Postcode] from the first form to autoappear in the orders form. The table names are the same in both forms.
On Form_Customer In the Click() for Create order button, I have the following code:
Private Sub CreateOrder_Click()
DoCmd.OpenForm Form_Orders, , , , acFormAdd, , Me.Title & "$" & Me.CName
End Sub
In load of Form_Orders I have:
Private Sub Form_Load()
If Me.NewRecord Then
Me.Title = Split(Me.OpenArgs, "$")(0)
Me.CName = Split(Me.OpenArgs, "$")(1)
End If
End Sub
Can anyone please advise why does this not work.... On another post this code was there and the guy said it worked. ?? I do not understand the programming at all really....so no comprehension of why it doesn't work....
Many thanks
Brian
