How to create a query/table that can look up and safe record

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

Guest

I am entering contact information on a form. Some of these records have the
same company name. How do I create a table/query thats keeps this company
information and looks up for this information , so it doesn't have to be type
over and over?
Help, Please.
Thanks a lot
 
Patty,

One approach here might be to use a Combobox on the form for the entry
of your Company. Set the Row Source property of the combobox to the
equivalent of this...
SELECT DISTINCT CompanyName FROM YourTable ORDER BY CompanyName

That way, all companies that have previously been entered will be
available from the combobox's drop-down list, or else will come up when
you type the first few characters of their name. Leave the Limit To
List property of the combobox set to No, so you can type the name of a
company not already used.

This assumes that you don't have/need a separate "master list" of
companies, with other company-related data, in a Companies table.
 
Steve:

I am just not getting this. I have entered the expression you gave me and it
does not work. I entered samples of company names and then I entered one of
those names again, but there is no list of company names on the list at all.
Do you mind if I attached this database to you? Right not has no records or
information so, is not a big size
 
Patty,

In the Row Source expression, I presume you changed what I gave you so
it is the actual name of your table (instead of 'YourTable') and your
field ('CompanyName')?

If you are entering multiple records, you will need to requery the
combobox before it will include the newly entered companies. Put code
like this on the Enter event of the combobox...
Me.CompanyName.Requery
 
Back
Top