Combo box multi autocomplete

M

murraystewart

Hi am very new to access and am making fair progress, but have struck
a problem. I have a database with an old existing table and am
creating a new table and form for it. On the new form I want to combo
box select a value (say name) from the old table and have it auto
complete other fields (say customer number, telephone number, address)
on the form and store these into the new table under slightly
different column names. Any direction would be much appreciated..
 
D

Douglas J. Steele

Why would you want to store the data redundantly? That's seldom a good idea.

In any case, remember that your combo box can contain multiple columns in it
(whether or not you show those additional columns). If you have the
additional pieces of data as columns in your combo box, you can add code
along the lines of the following to the combo box's AfterUpdate event:

Private Sub MyCombo_AfterUpdate()

Me.txtCustomerNumber = Me.MyCombo.Column(1)
Me.txtTelephoneNumber = Me.MyCombo.Column(2)

End Sub

In that example, I've assumed that the customer number is column 2 of the
combo box, and the telephone number is column 3 (the Column collection
starts numbering at 0)
 
D

Diego via AccessMonster.com

What happens if you want to fix a default value in the combo box ?
The column 1 and 2 will updated or not ?
I have a similar application where i want to fix a default value in the combo
box and obviously also for the other colomns

Thank in advance

Why would you want to store the data redundantly? That's seldom a good idea.

In any case, remember that your combo box can contain multiple columns in it
(whether or not you show those additional columns). If you have the
additional pieces of data as columns in your combo box, you can add code
along the lines of the following to the combo box's AfterUpdate event:

Private Sub MyCombo_AfterUpdate()

Me.txtCustomerNumber = Me.MyCombo.Column(1)
Me.txtTelephoneNumber = Me.MyCombo.Column(2)

End Sub

In that example, I've assumed that the customer number is column 2 of the
combo box, and the telephone number is column 3 (the Column collection
starts numbering at 0)
Hi am very new to access and am making fair progress, but have struck
a problem. I have a database with an old existing table and am
[quoted text clipped - 3 lines]
on the form and store these into the new table under slightly
different column names. Any direction would be much appreciated..
 
M

murraystewart

Why would you want to store the data redundantly? That's seldom a good idea.

I need a single table result to sync with an application running on a
Pocket PC that can only access a single Table.
 
D

Douglas J. Steele

murraystewart said:
I need a single table result to sync with an application running on a
Pocket PC that can only access a single Table.

Can you create a query that consolidates all of the information, and have
the application use that query rather than a table?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top