Can I change a text data to numeric data?

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

Guest

I have a field that containes data such as H, M, or S. Is there a way that I
can change the data to Numbers such as H =1 ; M=2; S=3. I have a
crosstab query that counts that field. When I have a student that has an H
and M it creates 2 lines of data. If I change them toa numberic field it
will give me a count of that field as well as list each type on the same
line. I ran a crosstab query similar to this but I used a Amount Field which
listed the amounts and also gave me a total. This report ran great. I need
to run the other report the same way.

Thanks
 
You lost me about the spot where you brought up the crosstab query. To
convert HMS to 1,2, or 3 use and expression like:
Instr("HMS",[YourHMSField])
 
Sorry for making this question confusing. I will try again and this time
make it simple. I want to replace a fields data "H" to read 1. I no
longer want the field to be a text field. Again sorry for posting twice
earlier.

Robin

Duane Hookom said:
You lost me about the spot where you brought up the crosstab query. To
convert HMS to 1,2, or 3 use and expression like:
Instr("HMS",[YourHMSField])

--
Duane Hookom
MS Access MVP


Robin said:
I have a field that containes data such as H, M, or S. Is there a way that
I
can change the data to Numbers such as H =1 ; M=2; S=3. I have a
crosstab query that counts that field. When I have a student that has an
H
and M it creates 2 lines of data. If I change them toa numberic field
it
will give me a count of that field as well as list each type on the same
line. I ran a crosstab query similar to this but I used a Amount Field
which
listed the amounts and also gave me a total. This report ran great. I
need
to run the other report the same way.

Thanks
 
Do you understand the Instr() function I suggested?
Do you actually want to change the field's data and data type? Or, do you
just want to display a number where you are storing a character?

--
Duane Hookom
MS Access MVP


Robin said:
Sorry for making this question confusing. I will try again and this time
make it simple. I want to replace a fields data "H" to read 1. I no
longer want the field to be a text field. Again sorry for posting twice
earlier.

Robin

Duane Hookom said:
You lost me about the spot where you brought up the crosstab query. To
convert HMS to 1,2, or 3 use and expression like:
Instr("HMS",[YourHMSField])

--
Duane Hookom
MS Access MVP


Robin said:
I have a field that containes data such as H, M, or S. Is there a way
that
I
can change the data to Numbers such as H =1 ; M=2; S=3. I have a
crosstab query that counts that field. When I have a student that has
an
H
and M it creates 2 lines of data. If I change them toa numberic
field
it
will give me a count of that field as well as list each type on the
same
line. I ran a crosstab query similar to this but I used a Amount Field
which
listed the amounts and also gave me a total. This report ran great. I
need
to run the other report the same way.

Thanks
 
No, I really do not understand the Instr() function. I want to display a
number where I am storing a character.

Thanks,

Robin
Duane Hookom said:
Do you understand the Instr() function I suggested?
Do you actually want to change the field's data and data type? Or, do you
just want to display a number where you are storing a character?

--
Duane Hookom
MS Access MVP


Robin said:
Sorry for making this question confusing. I will try again and this time
make it simple. I want to replace a fields data "H" to read 1. I no
longer want the field to be a text field. Again sorry for posting twice
earlier.

Robin

Duane Hookom said:
You lost me about the spot where you brought up the crosstab query. To
convert HMS to 1,2, or 3 use and expression like:
Instr("HMS",[YourHMSField])

--
Duane Hookom
MS Access MVP


I have a field that containes data such as H, M, or S. Is there a way
that
I
can change the data to Numbers such as H =1 ; M=2; S=3. I have a
crosstab query that counts that field. When I have a student that has
an
H
and M it creates 2 lines of data. If I change them toa numberic
field
it
will give me a count of that field as well as list each type on the
same
line. I ran a crosstab query similar to this but I used a Amount Field
which
listed the amounts and also gave me a total. This report ran great. I
need
to run the other report the same way.

Thanks
 
Add text box to your report and set its control source to:
=Instr("HMS",[YourHMSField])
Make sure the name of the text box is not the name of a field.
--
Duane Hookom
MS Access MVP


Robin said:
No, I really do not understand the Instr() function. I want to display a
number where I am storing a character.

Thanks,

Robin
Duane Hookom said:
Do you understand the Instr() function I suggested?
Do you actually want to change the field's data and data type? Or, do you
just want to display a number where you are storing a character?

--
Duane Hookom
MS Access MVP


Robin said:
Sorry for making this question confusing. I will try again and this
time
make it simple. I want to replace a fields data "H" to read 1. I no
longer want the field to be a text field. Again sorry for posting
twice
earlier.

Robin

:

You lost me about the spot where you brought up the crosstab query. To
convert HMS to 1,2, or 3 use and expression like:
Instr("HMS",[YourHMSField])

--
Duane Hookom
MS Access MVP


I have a field that containes data such as H, M, or S. Is there a
way
that
I
can change the data to Numbers such as H =1 ; M=2; S=3. I have a
crosstab query that counts that field. When I have a student that
has
an
H
and M it creates 2 lines of data. If I change them toa numberic
field
it
will give me a count of that field as well as list each type on the
same
line. I ran a crosstab query similar to this but I used a Amount
Field
which
listed the amounts and also gave me a total. This report ran great.
I
need
to run the other report the same way.

Thanks
 
Back
Top