Passing "text" to a table rather than "numbers". HELP!

  • Thread starter malhyp via AccessMonster.com
  • Start date
M

malhyp via AccessMonster.com

Hi there, can anyone help?

I have created a few tables with fields called...

Table: Country
Field: idCountry (Auto Number)
Field: Country (Text)

Table: Suppliers
Field: IdCountry (Numeric)

The idCountry field in the Suppliers table has a relationship with the
idCountry field in the Country table.

When you view the Suppliers table, you can see the country name,. Eg
Australia.
The SQL that Access created in the Row Source is...

SELECT [tblCountry].[idCountry], [tblCountry].[Country] FROM tblCountry;

When the website I created calls the information from the Suppliers,
idCountry field it calls the number of the country. Eg: 1.

Is there a property I can change in the cell or can I change the SQL so that
it actualy passes the text value rather than the numeric one?
 
B

Brendan Reynolds

Create a query that joins the two tables ...

SELECT Suppliers.*, Country.Country FROM Suppliers INNER JOIN Country ON
Suppliers.CountryID = Country.CountryID

Have your web site select data from the query rather than the table.
 
T

Tim Ferguson

When the website I created calls the information from the Suppliers,
idCountry field it calls the number of the country. Eg: 1.

Is there a property I can change in the cell or can I change the SQL
so that it actualy passes the text value rather than the numeric one?

SELECT OneThing,
AnotherThing,
Country

FROM Suppliers LEFT JOIN Countries
ON Suppliers.IDCountry = Countries.IDCountry

WHERE SupplierCode = WhatTheUserWanted

Hope that helps


Tim F
 
T

Tim Ferguson

Thanks for your help. That worked just perfect.

Apols due to Brendan, who gave the same correct answer before me. I pressed
my "reply" button before realising that he had already followed up.

All the best


Tim F
 
B

Brendan Reynolds

No apology necessary, Tim, that's just the nature of usenet. Besides, you
added value to the discussion by including the WHERE clause in your example!
:)
 

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