Duplicating Field and Format Change

OpethPHX

New member
Local time
Today, 16:10
Joined
Feb 9, 2007
Messages
6
First off a big thank you to this forum... have solved a lot of questions I have had and some I never knew I had. Keep in mind this is all from a non-programmer so my question(s) might not be technically sound.

The issue I have is I have built a database to track documents that we process. It is uses an autonumber and that has worked great. The issue is eventually this document gets processed in our accounting system and I want to retrieve data from there and add it to the document record.

I figured out how to like the ODBC database and that worked, but I get an expression error. The field in the ODBC database is text and in Access it is an Autonumber.

Is there a way to copy the autonumber field and change it to text property to align with the other database?

All help welcome and appreciated.
 
Try using the Cstr() function to convert your autonumber field into text.
It converts numbers into strings. Have not tried it on autonumber fields,
but I think it will work there, just like a regular number field.

In query design, create another field e.g.:

Exp1:Cstr(YourAutoNumberFieldName).

then use Expr1 for your purposes instead of the autonumber field.
 
CStr will indeed convert an autonumber to text.

Or you can always use Format$ if there is a specific format you wanted to use. CStr() is a bit more free-form. Format$() is more fixed-form.
 
Thanks for the replies and CStr did exactly what you said. A follow-up question would be can you do that operation in the table itself? The reason I want to is that would then be the link to join it with another table. If not, I am sure I can find a work around, but that seemed most logical.
 
You can use a query any place you would use a table. So you don't need to worry about the table level stuff.
 

Users who are viewing this thread

Back
Top Bottom