tables

P

pat

I have a table with a field, field1 for example that is
type number(integer).


I have a second field, say field2 that is type text.
Whenever I enter a value for field1 i wish to
automatically ensure that it is copied to the field
field2, whether done in a table, query or form mode.


any ideas???


pat
 
A

Arvin Meyer

Storing the same data twice is both unnecessary and a violation of database
normalization rules. You can always refer to field1 in a query, including
concatenating additional calculated data to it. Perhaps you could outline
your problem more specifically.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
P

pat

I have linked a table from an external database that
contains field1 as text, I have to retrieve records from
a table within the primary database that has the same
data only as integer (number) I cannot seem to find
anyway to link the two fields without the error of
datatype mismatch occurring, I CANNOT CHANGE DATA TYPES.

I have tried, str, val, nz nothing works.



pat
 
A

Arvin Meyer

You are looking for the CStr function or the CInt function (or CLng if it's
a long integer), depending upon which direction you want to go:

StringCovert: CStr([NumericField])

Add a column like the above to your numeric data field in a query, then save
that query. Use that saved query just like a table in a second query,
joining the text field on the above.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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