different data type

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

Guest

hello professnols,

In my table I have, among other, two fileds "Activity" and "Accont ID". I
use form to fill the data in the table. If the field "activity " is either
"deposit" or withdraw" the field "Account ID" should read "NA" (data
type=text) but if the field "Activity" is "transfer" then the filed should
wait for the numeric data to be filled(data type=number). so my problem is
can i make a field to accept both type of data ( number and text) ?? please
help
 
Access only allows a field to be of a single data type.

Your only choice would be to use a Text field. However, if you did that,
you'd find it difficult to do arithmetic with the numeric values.

The typical thing is to designate that the field is not required, so that a
Null value will be stored in it when there isn't a value. You can easily
display NA for the null values using the Nz function. You'd create a query
that selects Nz([AccountID], "NA") rather than just selecting AccountID, and
use use that query wherever you would otherwise have used the table.
 
Thanks for help

Douglas J. Steele said:
Access only allows a field to be of a single data type.

Your only choice would be to use a Text field. However, if you did that,
you'd find it difficult to do arithmetic with the numeric values.

The typical thing is to designate that the field is not required, so that a
Null value will be stored in it when there isn't a value. You can easily
display NA for the null values using the Nz function. You'd create a query
that selects Nz([AccountID], "NA") rather than just selecting AccountID, and
use use that query wherever you would otherwise have used the table.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


senkurion said:
hello professnols,

In my table I have, among other, two fileds "Activity" and "Accont ID". I
use form to fill the data in the table. If the field "activity " is either
"deposit" or withdraw" the field "Account ID" should read "NA" (data
type=text) but if the field "Activity" is "transfer" then the filed should
wait for the numeric data to be filled(data type=number). so my problem is
can i make a field to accept both type of data ( number and text) ??
please
help
 

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

Back
Top