Carrying Values forward to a new record

jazjam

New member
Local time
Today, 15:54
Joined
Jan 17, 2001
Messages
6
Don't know if anyone can help, I want to using a combo box select a Contact Name and the Contact Details show automatically on the form, this is have to be done using two tables. The date entry form uses table FirstEntryT but the Contact details are in a table called ContactDetails.

The combo box source type is:

SELECT DISTINCTROW [ContactDetails].[ContactID], [ContactDetails].[Contact] FROM [ContactDetails];

The event procedure below only works by placing the Contact name in the required field on the form but the rest of the contact details are not passing to the Ven**** field on the form.

Private Sub ContactID_AfterUpdate()
'Update VenContact controls based on value selected in ContactID combo box.
Me!VenContact = Me![ContactID].Column(1)
Me!VenCompany = Me!Company
Me!VenJobTitle = Me!JobTitle
Me!VenAdd1 = Me!Add1
Me!VenAdd2 = Me!Add2
Me!VenCity = Me!City
Me!VenPostCode = Me!PostCode
Me!VenCountry = Me!Country
Me!VenMobile = Me!Mobile
Me!VenTel = Me!Tel
Me!VenFax = Me!Fax
Me!VenEmail = Me!Email
End Sub

Being new and inexperienced in VBA need guidance as to were I'm going wrong. All advice greatly appreciated.

Jazjam
frown.gif
 

Users who are viewing this thread

Back
Top Bottom