Best way to fetch an address into a form

Goody974

Registered User.
Local time
Today, 23:51
Joined
Jun 14, 2016
Messages
16
Hi All

I'm a little bit of a noob when it comes to access but have fumbled along so far.

I have created a form along with tables so that I can create a purchase ordering system for myself.

I have a table with my suppliers in it, address details etc.

On the form, I would like to select the supplier from a drop down box (already done this bit), but then I want it to populate a text box, or several text boxes, with the address of the supplier.

Can I ask what the best method for doing this would be?

Thanks All

Tony
 
add those info in your supplier combo (address, phone, etc).
set their columnwidth to 0, if you don't want to show it in the combo.
then, on afterupdate event of the combo, just set the value:

Private Sub cboSupplier_AfterUpdate()
' combo columns are zero based meaning what you see column 1, in code
' you refer it as column 0.
' if column 2 is the address
me.txtSupplierAddress = Me.cboSupplier.Column(1)
' if column 3 is phone number of supplier
me.txtSupplierPhone = Me.cboSupplier.Column(2)
' .....
' etc...
End Sub
 
Thats fantastic ArnelGP. Thank you!
 

Users who are viewing this thread

Back
Top Bottom