Number ?

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

Guest

I am using the Lookup Wizard within table design view and it works great,
however, when I finish it says it must save the relationship (fine), but it
changes the field "Company" from data type TEXT to data type number - anyone
know why it is doing this?

Thanks !
 
That's because that's what it's supposed to be doing.

While you may think you're storing the company name, you're actually storing
the Id from the Company table (and that's as it should be). This is one of
the many reasons why many of us think the entire Lookup Field capability in
tables was an extremely bad idea to implement.

You might be interested in reading "The Evils of Lookup Fields in Tables" at
http://www.mvps.org/access/lookupfields.htm at "The Access Web"

The alternative is to use forms for input, and have a combobox on the form.
The combobox looks up the details in the Company table and is bound to the
Company field in your second table.
 
I am using the Lookup Wizard within table design view and it works great,
however, when I finish it says it must save the relationship (fine), but it
changes the field "Company" from data type TEXT to data type number - anyone
know why it is doing this?

Thanks !
By any change have you set it to AutoNumber?
 
Sorry for asking such an odd question - so if what I am doing is not
necessary a good think - what is the best way to have a "pull down" selection
for the user (like province names) WITHOUT hard coding the list.

Thanks Douglas !

Ty
 
No.

In one table I have a list of companies. The other table I have a company
name field - I have trying to create a lookup wizard so when they click on
company name it queries the table with all the companies it so they have to
pick one of the companies.

Ty
 
No.

In one table I have a list of companies. The other table I have a company
name field - I have trying to create a lookup wizard so when they click on
company name it queries the table with all the companies it so they have to
pick one of the companies.
Due to Douglas answer I found out, what you really are doing.
I never have and I never will do this.

I use a combobox on the form
Have you read the link Douglas was pointing?
 
Yes, read the link, but don't quite understand it.

As I said I am relatively new to access.
 
Ty said:
Yes, read the link, but don't quite understand it.

As I said I am relatively new to access.

Basically if you use a form for data entry you can cojnstruct a ComboBox that
displayes choices from one table that you can use to make entries in the form's
table. Just like your lookup fields only without having to define anything at
the table level.

Doing this on a form can be accomplished with a wizard every bit as easy to use
as the one in the table that you have already used.
 
Thanks - how do I do this on a form then.

Basically I have a company field and I have a table full of various
companies when they click on company name I want them to see a list of valid
companies that they can choose from.

Sorry to bother you - I am realtively new to access.


Thanks.

Ty
 
Ty said:
Thanks - how do I do this on a form then.

Basically I have a company field and I have a table full of various
companies when they click on company name I want them to see a list
of valid companies that they can choose from.

Sorry to bother you - I am realtively new to access.

Open your form in design view, make sure the ToolBox wizard is enabled, and then
drag a ComboBox onto the form. The wizard will fire up and it should be
self-explanatory from there.
 
Thanks - how do I do this on a form then.

Basically I have a company field and I have a table full of various
companies when they click on company name I want them to see a list of valid
companies that they can choose from.

Sorry to bother you - I am realtively new to access.

Your Table should have the numeric CompanyID in its Company field. You
have this already - the fact that it's a numeric CompanyID field is
simply obscured from your view by the Lookup misfeature!

Create a new Form based on the table.

Click the Magic Wand icon on the form Toolbox.

Select the Combo Box tool.

Drag the combo box onto the form where you want the company to be
displayed.

Follow the prompts, telling Access you want to pull the data from a
Table or Query.

Choose the lookup table which the lookup wizard created for you.

Accept Access' offer to conceal the ID and display the company name.

John W. Vinson[MVP]
 
Back
Top