Automatically add contact details to forms in Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am new to Access and have created a form to track my job cards (we have a
power tool repair shop). I want to be able to add customer data and have the
address and /or phone number automatically inserted into the form. We use
job cards and we print the information from the form file directly onto our
job cards. I have used a combo box to link my customer table to the customer
name on the form which saves a lot of time, but would like to have the phone
number drop into place too. Is it possible and can someone guide me to a
site that I can learn the process?
 
Hi,



Have the combo box list with multiple columns (some can be hidden),
including the phone number. Say the phone number column is the 6th column in
the list.

In the after update event of that combo box, add a line of code like:


Me.PhoneNumber = Me.ComboBoxNameHere.Column(5)


( 5, since it starts its count at 0, not at 1).


That's all... I mean, so "few" should do exactly what you asked.


How to add columns in the list of the combo box (once the wizard has been
run once) ? Edit the RowSource property, that is a query, add the
field/expression there. Next, you also have to save the property ColumnCount
(to reflect the number of columns SELECTed in the query) AND the property
ColumnWidth ( separated list of widths, one value per column, 0 mean an
invisible column, since no room would be supplied to display it)).





Hoping it may help,
Vanderghast, Access MVP
 
Back
Top