I have a Customers table with an Address field. I also have an Orders table with a DestinationAddr ess field. When a customer is selected on the Orders form, I'd like to have a command button that when clicked, pulls the selected customer's default address from Customers.Addre ss and copies it into Orders.Destinat ionAddress.
The command button is named DD. I have:
Private Sub DD_Click()
If Me.DestinationA ddress = Null Then
Me.DestinationA ddress = "=SELECT [Customers].[Address],[Orders].[CustomerID] FROM Customers INNER JOIN [Orders] ON [Customers].[CustomerID]=[Orders].[CustomerID];"
Else
Me.DestinationA ddress = Null
End If
End Sub
The command button is named DD. I have:
Private Sub DD_Click()
If Me.DestinationA ddress = Null Then
Me.DestinationA ddress = "=SELECT [Customers].[Address],[Orders].[CustomerID] FROM Customers INNER JOIN [Orders] ON [Customers].[CustomerID]=[Orders].[CustomerID];"
Else
Me.DestinationA ddress = Null
End If
End Sub
Comment