Select names from list box and add to new table

G

Guest

Hi,

I have an access database that is populated by a transactional system's
export procedure. I can't change or modify the tables in any way. There is
a customer table that lists all of our customers. I want to create a form
where someone in our customer service department selects someone from a drop
down box and then clicks on a button. By doing this, the name of the person
and today's date are sent to a separate table called InsideSales. There
should be two fields in this table: CustomerName and Date. I can then do
queries on who the person has spoken with and what the date was. Can someone
help me with how to build this? I know how to create the list box based on
the CustomerName field in the Customer table but could use help with
everything else.

Chuck
 
J

Jeff Boyce

Chuck

I'm not clear from your description, but it sounds like you are using
existing data (?Customer info) to help you create a "contact list"
(customers contacted on specific dates).

If so, you'll need to create the new table first, but why bother storing
CustomerName when you already have that information elsewhere? If your
imported data includes CustomerID and CustomerName, you'd only need to store
the CustomerID. You could use a query to join CustomerID and get back
CustomerName.

Take a look at the process behind the "wizards" button. You have TWO list
boxes, one hold possibles and the other holding selecteds. Is that similar
to what you want to accomplish?

You can add a command button to your form that reads the ID of the customer
selected in the first list box and adds (INSERT) that ID and Now() to your
new table.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Jeff,

Thanks for your help. I can use CustomerID instead of CustomerName. I was
figuring I would need to create a new table called InsideSales which I
can do. I didn't understand what you meant when you said "Take a look at
the process behind the "wizards" button. You have TWO list boxes, one hold
possibles and the other holding selecteds". Where are these wizards? It
would be nice to have a box on the left with all customers and then have the
inside sales person double click a name from this list and have it appear on
the right (and in my new InsideSales table).

Thanks,

Chuck
 
J

Jeff Boyce

Chuck

From the database window, click on the Tables tab, click on the drop-down
arrow of the toolbar button that has "New Object", and select "Query", then
pick "Simple Query Wizard". That gets you started.

During the wizard, Access will ask you which table/query... It shows the
available fields in the listbox on the lefthand side. After you pick a
field (e.g. double-click it), it "moves" to the listbox on the righthand
side.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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