AUTO UPDATE FROM QUERY

A

Andy

Hi Hello,

I am a new user for MS ACCESS,

I have a form named "order lookup" with criteria of
[forms]![order]![customer ID]

I want to find the field named "Tel" and copy the data in the "order" form
and try to write the code as below :

Private Sub CUSTOMER_ID_AfterUpdate()

DoCmd.OpenForm "order lookup"
Me.[TEL] = Forms![ORDER LOOKUP]![TEL]
DoCmd.Close

End Sub

It's work fine but it's not a good coding, I want to use querydef method but
fail, could you please help send me a code for reference? Thanks in advance!
 
Top