combo box autofill

C

Carl

I have a form with a name box and one with the email. What i am trying to do
is as you type in the name it will go ahead and fill in the name as you type
and the letters change and as this happens it also looks up the e-mail
address and shows it in the 2nd combo box and changes as the name changes. If
the name is not in the table it will automaticly save it to the table and
updat the table so the next time you look for it it will show up in the name
combo box with the save button i have on the form can anyone help.

Thank you
Carl
 
J

Jeff Boyce

Carl

A combobox is used to select from a list of available items. Why would your
second control be a combobox if you would be "filling" it with a
pre-existing email address?

And if the email address already exists, why would you be storing it again?

You can set a combobox in Access to autocomplete, which sounds a little like
what you are describing as you type in the name.

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
C

Carl

I have a table with the names and e-mail address and 2 other with a check box
for a yes/no from the form i have a combo box that drops down with names and
it will auto put in the names as you type that works fine but i can not get
the 2nd combo box the auto fill with the address as you type in the name as
you type and it will not fill it in even after you get the hole name. So what
i am trying to do is get it to automaticly put in the address as you type in
the name or pick it from the dropdown list and if the name is not on the list
it will add it to the table.
carl
 
R

Ron2006

IF the email address is in the same table or a linked table with the
name then


create a query that includes the names AND the email address sorted by
name

Use this query as the basis for the name combo and have fields set to
2 bound to 1 and lenghts to show or not show both fields.

In afterupdate event of combo place code:

me.emailtxtfieldname = me.namecomboname.column(1)

This saves you from using a lookup that is a slower function.
The ## for the column is a 0 based number. First column would be 0,
second column is 1, etc.

Ron
 

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