View Full Version : Two address fields from the same table?


trackmedic
01-07-2002, 05:55 AM
Hey guys (and gals),

I have a form with a ship to area and a ship from area. I am having problems. The addresses that are used come from a table called addresses. I have made a combo box to pull this information. The ship from works fine but the ship to don't work. Basically can I have two address fields pulling information from the same table.

Jack Cowley
01-07-2002, 06:58 AM
When you create your combo box be sure and but in both addresses. Maybe something in the order of: ID, ShipFromAdd, ShipFromCity, ShipToAdd, ShipToCity. Then in the After Update event of your combo box use code similar to this:

Me.ShipFromAdd = Me.ComboBoxName.Column(1)
Me.ShipFromCity = Me.ComboBoxName.Column(2)
Me.ShipToAdd = Me.ComboBoxName.Column(3)
Me.ShipToCity = Me.ComboBoxName.Column(4)

Pat Hartman
01-07-2002, 07:01 PM
Do you have one combobox or two? If the addresses are independant, you need two. You didn't say what didn't work regarding the ShipTo address so it's hard to offer suggestions.