Pulling default address from another table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Coolboy55
    New Member
    • Jul 2007
    • 67

    #1

    Pulling default address from another table

    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
  • Coolboy55
    New Member
    • Jul 2007
    • 67

    #2
    Ignore or Delete

    I figured it out. This thread can be deleted.

    Comment

    Working...