Dynamic data update

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RoyNg
    New Member
    • Jun 2006
    • 2

    #1

    Dynamic data update

    Dear all guys,

    I am beginner for Access VBA. I am programming Access 2003.

    I have one form containing one subform. The form mainly perform customer payment function.

    When user chooses customer id in the pull down list on the form, the subform will dynamic update the data according to customer id.

    I have put these code in event handler.
    Then, runtime error 2465 happen.

    Would anyone help me solve? Or comment my programming skillls to perform such above function.

    Code sample:
    Private Sub CustCode_AfterU pdate()
    [Forms]![CustPaySubForm]![CustCode] = [CustForm]![CustCode]
    End Sub
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    In fact if you've been well setted your main and sub form you don't need code to transmit the values!

    If you have an relation between the main and the sub tables Customer ID

    You have only to mention in the subform properties that main field is Cust ID from the main form
    And chield field is cust id from the subform and the transmission is ok! :)

    Comment

    Working...