473,583 Members | 3,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can't find where to change data type

Dear Access Group:

This is the most basic and most embarrassing of questions, but I
cannot find where to change the data type of a text field that I have
in Access 2003 to a number field. I've searched high and low through
help databases and on the internet.

The directions say to :
Open the table in Design view
Click the Data Type column of the field you want to change, click the
arrow, and select the new data type.

I'm in design view, and I've gotten everything done for my
application, but I need to change the data types of several text
fields to number fields. I just can't make the data type column thing
pop up for the field that I've highlighted so that I can make the
change. Please let me know what I'm overlooking.

By the way, while I'm here, how can I make one of my numerical
database fields to be the sum total of several other numerical
fields. Thank you all and talk to you soon!

Sincerely,

Michael
Jan 10 '08 #1
8 3262
mlwerth wrote:
Dear Access Group:

This is the most basic and most embarrassing of questions, but I
cannot find where to change the data type of a text field that I have
in Access 2003 to a number field. I've searched high and low through
help databases and on the internet.

The directions say to :
Open the table in Design view
Click the Data Type column of the field you want to change, click the
arrow, and select the new data type.

I'm in design view, and I've gotten everything done for my
application, but I need to change the data types of several text
fields to number fields. I just can't make the data type column thing
pop up for the field that I've highlighted so that I can make the
change. Please let me know what I'm overlooking.
What you did not state is if you have a front/backend setup and you are
attempting to update the tables in the front end.

If you do have a front/backend setup, are you in the backend?
By the way, while I'm here, how can I make one of my numerical
database fields to be the sum total of several other numerical
fields. Thank you all and talk to you soon!
Use a query...unless you are seeking to remove those fields and simply
have 1 field...then delete the fields. With a query, you can do
something like
TotField:[fld1]+[fld2]+[fld3]

Lips
http://www.youtube.com/watch?v=Dq42To1QgtY
>
Sincerely,

Michael
Jan 10 '08 #2
"mlwerth" <mw****@budojo. orgwrote
The directions say to :
Open the table in Design view
Click the Data Type column of the field you want to change, click the
arrow, and select the new data type.

I'm in design view, and I've gotten everything done for my
application, but I need to change the data types of several text
fields to number fields. I just can't make the data type column thing
pop up for the field that I've highlighted so that I can make the
change. Please let me know what I'm overlooking.
I'm sorry, but I don't understand what you mean by "I just can't make the
data type column thing
pop up for the field that I've highlighted so that I can make the change."
If you have the Table open in Design View, you should see three columns,
"Field Name", "Data Type", and "Descriptio n." If you place the mouse
pointer in the column "Data Type" of the Field you want to change, and
click, you should see a vertical bar for entering text and, on the right of
that column, a little box with a down-arrow. If you click the down arrow, it
should drop down a list of data types, and you should be able to click on
"Number", and the drop-down will disappear but the column should read
"Number". In the area below the list of fields, you should see the Field's
properties, one of which "Field Size", is where you specify the type of
number, again by clicking, and choosing from a drop-down.

Even for linked tables, where you can't change the properties, it will let
you do this; but, when you try to close the table view, it won't save them.

Maybe you can list, at this level of detail, what you are doing, what you
see, and what happens when you click, and someone can help you.

By the way, while I'm here, how can I make one of my numerical
database fields to be the sum total of several other numerical
fields. Thank you all and talk to you soon!
In Access, you cannot define a Field in a table to be the result of a
calculation. You can do that calculation in a Query, or in the Report, or
Form in which you are displaying the data.

Larry Linson
Microsoft Access MVP
Jan 10 '08 #3
Thank you everyone!

Hi Larry:

I finally found that behind the form that I was designing was a screen
that allowed me to switch to table design, and then I changed the
field types from text to number no problem.

Now, about the query! I've got 9 number fields that I want to total,
and have it show up on my form. So, I'm in the form design view, and
my form is looking beautiful. I have a field on the form that I want
to be the total of the 9 fields, but I was told that one field cannot
be based on a calculation from other fields.

How do I get a box to appear on the screen where I can put a formula
into it to calculate the sum of these other 9 fields? What menu
commands do I use, or can I use the mouse to drag a "query box" of
some kind onto the screen where I can program it? I really know
nothing about how to make a query appear on my form desgin. Thank you
again and talk to you soon.

Sincerely,

Michael

Jan 11 '08 #4
mlwerth wrote:
Thank you everyone!

Hi Larry:

I finally found that behind the form that I was designing was a screen
that allowed me to switch to table design, and then I changed the
field types from text to number no problem.

Now, about the query! I've got 9 number fields that I want to total,
and have it show up on my form. So, I'm in the form design view, and
my form is looking beautiful. I have a field on the form that I want
to be the total of the 9 fields, but I was told that one field cannot
be based on a calculation from other fields.
Someone must be pulling your leg then.
How do I get a box to appear on the screen where I can put a formula
into it to calculate the sum of these other 9 fields? What menu
commands do I use, or can I use the mouse to drag a "query box" of
some kind onto the screen where I can program it? I really know
nothing about how to make a query appear on my form desgin. Thank you
again and talk to you soon.
In your query you can create a calculated field. Let's say you want to
add fld1...fld3. You could enter in the querybuilder
TotalOfFields : [fld1] + [fld2] + [fld3]

There's the chance you want to create the calculated field on the form
instead of the query. In the control source of the field (TotalFlds)
you could enter something like
=[fld1] + [fld2] + [fld3]

There's a caveat. What happens if you have Null values in the values to
be summed. Let's pretend fld2 is blank.
fld1 = 1
fld2 = Null
fld3 = 2
? fld1 + fld2 + fld3
Null
That's not right. Right? You want to see a 3 as the result.

You need to do 1 of 2 things. NZ() the fields or change the table slightly.

Using NZ, you can force a value of zero if null. Ex:
=NZ([fld1],0) + NZ([fld2],0) + NZ([fld3],0)

If you do have null values (open the table and scan thru it looking for
blanks in the numeric fields). If some fields are blank, you can fix
the table it so all records will have zeros in the fields.

Open the table and ensure the DefaultValue is 0 for each fld to be
summed (If the DefaultValue says Null or is blank, enter a zero).

Next, update all fields used in your summing and set the value to 0 if
null. Ex:
UPDATE Table1 SET Table1.Fld1 = 0
WHERE (((Table1.Fld1) Is Null));

Run this query for each field to be summed...in your case 9 times. Once
all null values have been updated to zero all new records will default
to zero for those fields. You won't need to NZ() them.
>
Sincerely,

Michael
Jan 11 '08 #5
Hi Salad:

Thank you for the excellent information. I plan to use the NZ
feature, because we don't want to automatically populate the fields
because we want to know if someone puts a zero in on purpose or some
other value, then we will know if the field has been reviewed and
updated.

Now, let me break down my question as simply as possible.
1) I've got a field on my form design that is called TtlProf . This
field will be the sum of the other 9 fields on the screen called
m1PY , m2PY, m3PY, etc.
2) Where is the control source that you've discussed for the TtlProf
field?
3) I clicked on the field box on the form design and typed what you
said, but when I went to view it, it said #Name?
4) I must therefore not be finding a think called control source on my
form design. I have the field there on the screen, and I want it to
automatically be the sum of these other 9 fields.

This has got to be simple, but I just don't know where to click to
type in the code. Thank you very much for your help.

Sincerely,

Michael


On Jan 11, 3:35*pm, Salad <o...@vinegar.c omwrote:
mlwerth wrote:
Thank you everyone!
Hi Larry:
I finally found that behind the form that I was designing was a screen
that allowed me to switch to table design, and then I changed the
field types from text to number no problem.
Now, about the query! *I've got 9 number fields that I want to total,
and have it show up on my form. *So, I'm in the form design view, and
my form is looking beautiful. *I have a field on the form that I want
to be the total of the 9 fields, but I was told that one field cannot
be based on a calculation from other fields.

Someone must be pulling your leg then.
How do I get a box to appear on the screen where I can put a formula
into it to calculate the sum of these other 9 fields? *What menu
commands do I use, or can I use the mouse to drag a "query box" of
some kind onto the screen where I can program it? * I really know
nothing about how to make a query appear on my form desgin. *Thank you
again and talk to you soon.

In your query you can create a calculated field. *Let's say you want to
add fld1...fld3. *You could enter in the querybuilder
* * * * TotalOfFields : [fld1] + [fld2] + [fld3]

There's the chance you want to create the calculated field on the form
instead of the query. *In the control source of the field (TotalFlds)
you could enter something like
* * * * =[fld1] + [fld2] + [fld3]

There's a caveat. *What happens if you have Null values in the values to
be summed. *Let's pretend fld2 is blank.
* * * * fld1 = 1
* * * * fld2 = Null
* * * * fld3 = 2
* * * * ? fld1 + fld2 + fld3
* * * * Null
That's not right. *Right? *You want to see a 3 as the result.

You need to do 1 of 2 things. *NZ() the fields or change the table slightly.

Using NZ, you can force a value of zero if null. *Ex:
* * * * =NZ([fld1],0) + NZ([fld2],0) + NZ([fld3],0)

If you do have null values (open the table and scan thru it looking for
blanks in the numeric fields). *If some fields are blank, you can fix
the table it so all records will have zeros in the fields.

Open the table and ensure the DefaultValue is 0 for each fld to be
summed (If the DefaultValue says Null or is blank, enter a zero).

Next, update all fields used in your summing and set the value to 0 if
null. *Ex:
* * * * UPDATE Table1 SET Table1.Fld1 = 0
* * * * WHERE (((Table1.Fld1) Is Null));
Run this query for each field to be summed...in your case 9 times. *Once
all null values have been updated to zero all new records will default
to zero for those fields. *You won't need to NZ() them.


Sincerely,
Michael- Hide quoted text -

- Show quoted text -
Jan 11 '08 #6
mlwerth wrote:
Hi Salad:

Thank you for the excellent information. I plan to use the NZ
feature, because we don't want to automatically populate the fields
because we want to know if someone puts a zero in on purpose or some
other value, then we will know if the field has been reviewed and
updated.

Now, let me break down my question as simply as possible.
1) I've got a field on my form design that is called TtlProf . This
field will be the sum of the other 9 fields on the screen called
m1PY , m2PY, m3PY, etc.
2) Where is the control source that you've discussed for the TtlProf
field?
You select TextBox from the Toolbox and put the new textbox on the form.
You can dbl-click on this new textbox on the form and the property
sheet will appear. In the Other tab, you can set the name to TtlProf
(if it doesn't already exist). In the Data tab, set the control source
to the formula to add the field.

To help you understand the concept, go thru a quick Form/New/FormWizard
process. Select a few fields, call/save the form as junk, and open it
for modification/design. Now from the toolbox add a command button,
listbox, combo box, checkbox, frame, etc. Then click on each type and
look at the property sheet for each object. Also, the fields from a
table have a control source filled in. This is a "bound" field
associated with a table field. An unbound field isn't associated with a
table field. Many properties are the same for all types but there may
be new ones as well. It would pay to get familiar with them (not
memorize them) so you know where to go to fix whatever.

3) I clicked on the field box on the form design and typed what you
said, but when I went to view it, it said #Name?
I have no idea what property you attempted to update.
4) I must therefore not be finding a think called control source on my
form design. I have the field there on the screen, and I want it to
automatically be the sum of these other 9 fields.
Solution is in point 2.
>
This has got to be simple, but I just don't know where to click to
type in the code. Thank you very much for your help.
Hang out in this newsgroup, read the posts, and in a while you will be
providing solutions to others.
>
Sincerely,

Michael


On Jan 11, 3:35 pm, Salad <o...@vinegar.c omwrote:
>>mlwerth wrote:
>>>Thank you everyone!
>>>Hi Larry:
>>>I finally found that behind the form that I was designing was a screen
that allowed me to switch to table design, and then I changed the
field types from text to number no problem.
>>>Now, about the query! I've got 9 number fields that I want to total,
and have it show up on my form. So, I'm in the form design view, and
my form is looking beautiful. I have a field on the form that I want
to be the total of the 9 fields, but I was told that one field cannot
be based on a calculation from other fields.

Someone must be pulling your leg then.

>>>How do I get a box to appear on the screen where I can put a formula
into it to calculate the sum of these other 9 fields? What menu
commands do I use, or can I use the mouse to drag a "query box" of
some kind onto the screen where I can program it? I really know
nothing about how to make a query appear on my form desgin. Thank you
again and talk to you soon.

In your query you can create a calculated field. Let's say you want to
add fld1...fld3. You could enter in the querybuilder
TotalOfFields : [fld1] + [fld2] + [fld3]

There's the chance you want to create the calculated field on the form
instead of the query. In the control source of the field (TotalFlds)
you could enter something like
=[fld1] + [fld2] + [fld3]

There's a caveat. What happens if you have Null values in the values to
be summed. Let's pretend fld2 is blank.
fld1 = 1
fld2 = Null
fld3 = 2
? fld1 + fld2 + fld3
Null
That's not right. Right? You want to see a 3 as the result.

You need to do 1 of 2 things. NZ() the fields or change the table slightly.

Using NZ, you can force a value of zero if null. Ex:
=NZ([fld1],0) + NZ([fld2],0) + NZ([fld3],0)

If you do have null values (open the table and scan thru it looking for
blanks in the numeric fields). If some fields are blank, you can fix
the table it so all records will have zeros in the fields.

Open the table and ensure the DefaultValue is 0 for each fld to be
summed (If the DefaultValue says Null or is blank, enter a zero).

Next, update all fields used in your summing and set the value to 0 if
null. Ex:
UPDATE Table1 SET Table1.Fld1 = 0
WHERE (((Table1.Fld1) Is Null));


>>Run this query for each field to be summed...in your case 9 times. Once
all null values have been updated to zero all new records will default
to zero for those fields. You won't need to NZ() them.

>>>Sincerely,
>>>Michael- Hide quoted text -

- Show quoted text -

Jan 11 '08 #7
Hello Salad:

Thank you for all your help.

Your tip of adding the fresh blank text box + the earlier tip of
forcing the zeros for null fields led to the break through for me. I
thank you for your help and everyone else's as well. I could not get
a sum with everything that I tried until we forced the zeros for the
blank fields. "=NZ([fld1],0) + NZ([fld2],0) + NZ([fld3],0) " - Salad

Thank you all again, and I hope to benefit and participate from this
site in the future.

Sincerely,

Michael
Jan 18 '08 #8
mlwerth wrote:
Hello Salad:

Thank you for all your help.

Your tip of adding the fresh blank text box + the earlier tip of
forcing the zeros for null fields led to the break through for me. I
thank you for your help and everyone else's as well. I could not get
a sum with everything that I tried until we forced the zeros for the
blank fields. "=NZ([fld1],0) + NZ([fld2],0) + NZ([fld3],0) " - Salad

Thank you all again, and I hope to benefit and participate from this
site in the future.

Sincerely,

Michael

Glad you got things working.

Hip Hip Hurray!
http://www.youtube.com/watch?v=bXk5PWs0EEs
Jan 18 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2378
by: Alan Bashy | last post by:
Please, guys, In need help with this. It is due in the next week. Please, help me to implement the functions in this programm especially the first three constructor. I need them guys. Please, help me. This was inspired by Exercise 7 and Programming Problem 8 in Chapter 3 of our text. I have done Exercise 7 for you: Below you will find the...
3
1557
by: pentium77 | last post by:
Basically I have a situation where I need to update changes occuring in one Text field of a table into another text field located in another table. In addition both the tables are located in different frames of a HTML page. So my question is can such an update be done ? Is it necessary that the tables be located in the same frame for the...
9
3326
by: WRH | last post by:
Hello I am new to asp but I made some Jscript functions which work fine. The functions contain some strings used as a registration key for some apps. It is important that these strings not be visible to a client using a browser. My question is...can a knowledgeable browser user view Jscript source code in an asp file?
14
2498
by: Robin Tucker | last post by:
Although I've been working on this project for 8 months now, I'm still not sure of the difference between ByVal and ByRef. As most objects in VB are reference types, passing ByVal I've discovered allows me to store a reference to the object I passed by val, to change that object and for the change to be reflected in the callers copy of the...
6
4858
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still...
13
4950
by: sonald | last post by:
Hi, Can anybody tell me how to change the text delimiter in FastCSV Parser ? By default the text delimiter is double quotes(") I want to change it to anything else... say a pipe (|).. can anyone please tell me how do i go about it?
19
2193
by: active | last post by:
I'm using a ComboBox to display objects of a class I've defined, say CQQ. Works great except somehow I occasionally set an Item to a String object instead of an object of type CQQ. It looks like Text replaces an item or something like that. This results in a runtime error at which time I learn that the item that should be CQQ is a...
2
3258
by: Orit | last post by:
Hello . Please find below my questions - I hope some of the ASP.NET experts of this forum will answer to those beginner's questions : My Web site should be able to work with either SQL Server or Access database as following : It will connect first to the Master database (SQL or Access, connection String of this database should be read...
0
7824
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8176
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8321
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5699
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5370
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3841
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1154
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.