Results 1 to 2 of 2

Thread: Compile error:

  1. #1
    Join Date
    Oct 2011
    Posts
    8

    Unanswered: Compile error:

    I have tried every which way to get this to work I am trying to put a check box in form that will pull the customer information from a differant form when checked

    Compile error: User-defined type not defined

    Private Sub chSameAs_Click()
    Dim oCustomers As Customer
    Dim sArgs As Variant

    Set oCustomers = New Customer
    sArgs = Me.OpenArgs

    oCustomers.QueryCustomers (sArgs)

    If Me.chSameAs.value Then
    Me.Address = oCustomers.Address
    Me.City = oCustomers.City
    Me.St = oCustomers.St
    Me.PostalCode = oCustomers.PostalCode

    ElseIf Not Me.chSameAs Then
    Me.Undo

    End If
    End Sub

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You declare:
    Code:
    Dim oCustomers As Customer
    Where and how is Customer defined?
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •