Can't Get My Weight Field To Accept Decimals...???
Aug 14, 2005
I've got a products table in which I have a field called weight. Obviously, this is to hold the weight of the item. I've it set to Number | Long Integer with desimal places set to 2. However, when I put 2.5 it makes it 2.
I am trying to insert data into a table through a combo on a form. Originally, I had the text field size set at 15 characters, but the data I wanted to enter changed to 25 characters in length, so I changed the field size to 25. I then got the following message:
"The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data."I increased the size, but still got the message. I even took the size right up to 100, but still got the message!
I have a tblParts that has data in this format 200200.0100 (these are bin numbers). I have created a form with a bound field (field name on the form is BinNo) that goes back to the tblParts. I need to be able for the user to enter on the form the Bin number as it appears above. However at the moment it is dropping my decimal and is only keeping the 200200 portion of the Bin Number. If I enter the bin number correctly into the table it accepts the correct format of 200200.0100. Can someone take a look at the form and the field BinNo to tell me what I may have missed. Keep in mind that the goal of the database is to enter the bin number into the form and run a query that creates a new table. There is also a delete table button since the data in the form will change for each blueprint document created. I am attempting to attach a practice db for you to see what I have done but I have not had much success with this in the past. Thanks in advance for your help.
All, I have inheirited a database which I am attempting to query via an SQL statement:
"SELECT * FROM MYTABLE ORDER BY SheetNumber;"
This query works fine under Access but when executed thru ADO 2.5 / Microsoft.Jet.OLEDB.4.0 from VB6 it reports the following error ("2147217833"):
"The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data."
First things first, I'm not trying to add/insert/paste any data (see SQL statement above). Secondly, when I remove "ORDER BY SheetNumber" from the SQL statement the error does not occur. I need to retain the ability to sort and would be grateful for any help/suggestions.
For your reference SheetNumber is defined as a 20 char Text field in Access.
I currently have a drop down box with four options in there and the options are:
Low Minimum Medium High
However when i change the options in the table to:
Low Moderate Significant High
it comes up with the error message: the field is too small the accept the amount of data you attemtpted to add. Try inserting or pasting less data.
I do not understand what is wrong with the second option of words? The maximum for characters is set to 255 so i am not sure why it is coming up with that error message.
I try to put an expression for the property "bound column" so that my lookup values will be directly dependent on one of attribute's choice
I have got four options for my attribute. Each option will use a slightly different set of lookup values. I save all four sets in another table.
Then in my properties definition I refer directly to this table as lookup base. When I put bound column number equal to an expression so as to choose the right column of lookup values it refuses. It seems that it does notl ike anything other than a numeric value.
If that's a no-go, I am not sure how to achieve what I try to do then?
Essentially I have a table that 4 attributes: QID,itemID,CatType,Catchoice
CatType can have only 4 values. Each value will make Catchoice take on a different set of combo values
The problem I am having is that I am stuck at the Catchoice lookup definition because it is dependent on what kind of CatType the user picks.
For some reason I cannot enter decimal values without the number rounding up or down. I've already set it to 'Number' and 'double' and have also tried 'Fixed' set to 2 decimal places. Right now the only way it works is if I set it to 'Text'. However I need to do some calculations with these values eventually.
What's strange is I have another table in the same database that is NOT rounding and is working just fine.
I have a field that sums pounds. I need to convert this to tons (rounded to the nearest 3 decimals), then multiplied by $67.50. This will calculate a fee payment.
This is what I have now:
Code: =Round(Sum([Hazardous_Waste]/2000*67.5),3)
The total pounds is 2675.
After dividing by 2000, Access generates a number of 1.3375. It rounds 1.3375 to 1.337 which generates an incorrect final total. Not sure how to alter this to round properly.
I have a form to input data into a table1. On the form I have a combo box to read from a next table exchange rate to input into the table1. Field in Tablet for the exchange rate is set to Field size double, Format currency, and decimals 6.
I am unable to set the field size on the form to read the 6 decimals. The combo box is set to Currency decimal 6. I tried General Number and it still only shows only one decimal.
I get the error message "The field is too small to accept the amount of data you are trying to add. try inserting or pasting less data." I'm not attempting to run an insert or update query.
Access Help lives up to expectations by just repeating the error message, and the posts I can find on the forum which mention this error all seem to include something about a maximum of 254 characters in a field. None of mine are anywhere near that amount.
Does anyone have any idea what could be causing this?
What is the usual way to store the weight in a Bill of material database? Do you store the weight for each assembly and each component or only the weight of the smallest components (where the weight of each assembly is calculated by adding the weight of each component)? The way my table is set up just now only the weight of the cast component and screws are recorded and no values are recorded for the assemblies, I just want to make sure that this set up is apropriate as I wouldn't like to redesign my table once the system is up and running.
I am having a problem to get my query to run properly. I have a huge IIf statement that doesn't seem to be working but I am not sure what is wrong with it. What it is supposed to do is return a good, actionable, or poor based on a specified weight and an actual weight. So what the query does is pull information from a table based on the specified weight and then using that information it should give back the correct rating in the last column.
Help! I have creadted a basic foirm to collect data. The problem is when I switch to form view, the "add data, delete data" butons are disabled. I tab thorough the fields and I cannot add any data??????????????
I have checked and rechecked the data properties of the form tab and allow additions and allow deletions are set to yes.
I am at the end of the rope and I am completely lost. Do I have to reinstall Access?
I have created a form based on a query that joins two tables. When I run the form, I am able to input new data into all fields that are from one of the two tables, but it won't accept new data into the second table. I don't get an error message that might help me identify the problem. The join between the tables is of the "include all records from Table A and only those records from Table B where the joined fields are equal."
Can anyone suggest where my problem might lie? Thanks!
Hello,I was wondering if anybody knew if it was posslble to show an aproximated value of a field with decimal records. I would like to see only integer values on my form.
I have a field that holds a unit price. I can't use currency as the data type because the currency type is different for each client. I have another field that specifies the currency type for each department. Up to now I've been using a double format with a 2 decimal places. We now need to increase the decimal places to 4 but don't necessarily want to see all four places if only 2 are required - 1.5000 against 1.50. However if I make the decimals as auto, if I have 1.50 it rounds to 1.5.
Any other way to give a bit of flexibility to this?
I am trying to round decimals to either .5 or 0 right now i have it set to 1 decimal place and it rounds to to the next place. So if a user puts in 1.23 it would round to 1.2 instead of 1.0, is there a simple way to solve this issue?
I have noticed diagrams showing Microsoft SQL Server accepting SQL statements sent by “SQL Requesters” over connections. I would like to know if Microsoft Access can be used in that fashion?
Put another way, can Access be configured to accept an SQL statement that another program (e.g. a VBA program in a VBA enabled 3rd party app) creates?
Currently, my VBA program instantiates an Access database object and then manipulates it (I just add a record to one of the tables), then closes and destroys it. This solution seems fragile (it stops working—I can explain more if needed). I would like to know if the technique inferred by my question would be more reliable.
When using 'ww' as the criteria in the DatePart calculation it will not accept 1 for 6th Jan 2005 which is week 1, you have to enter 2 and it will select it, in fact all the weeks so far in 2005 are out by 1. To cure it you can add on -1 to the query and it works fine until you go back to the previous year and it screws up those dates.
I've scoured the dozen archived threads that relate to my challenge, but I still can't quite overcome it.
I have an aggregate query that runs but returns no values.
This is how I've tried to set things up: A user makes a multiple selection in a list box on a form. The multiple selection gets strung into an SQL that I feed to a hidden control on the form. Whatever is in the hidden control then becomes the Where clause that I reference in a Criteria cell in my query. The query is run when the user presses a command button.
Can anybody tell what's wrong with my code? Thanks very much in advance!
Private Sub cmdTractSelect_Click() On Error GoTo Err_cmdTractSelect_Click
'Declare variables Dim db As Database Dim tbl As TableDef Dim fld As Field Dim qry As QueryDef Dim frm As Form Dim ctl As Control Dim varItem As Variant Dim strSQL As String
'Assign values to the variables Set db = CurrentDb() Set tbl = db.TableDefs("City") Set fld = tbl.Fields("Tract") Set qry = db.QueryDefs("Param") Set frm = Forms!frmTractSelect Set ctl = frm!lstTract strSQL = "[Tract]="
'Grab the list-box selection and string it into SQL For Each varItem In ctl.ItemsSelected strSQL = strSQL & ctl.ItemData(varItem) & " Or [Tract]=" Next varItem
'Make sure the user selected at least one tract If Len(strSQL) = 0 Then MsgBox "You didn't select anything" _ , vbExclamation, "Nothing to find!" Exit Sub End If
'Trim the SQL strSQL = Left$(strSQL, Len(strSQL) - 12)
'Insert the SQL into a hidden control that will feed_ 'the criteria of the Tract field txtWhere.Value = strSQL
I have a db for my clinic with 3 tables, one is Patient (P_ID, P_Name, P_Age, P_Sex...etc. The second is Referral (R_ID, R_Date, R_Clinic, R_Diagnosis...etc. The third is Therapist (T_ID, T_Name, T_Division, TherapyDate, T_Plan...etc.
The main form contains all patient info and below I have a subform showing info from both other tables (Referral and Therapist).
Each patient could have more than one referral, so I made the relation between Patient table and Referral table, one to many.
Other relations are as follow:
Patient to Therapist (one to many) because one patient could be treated by different therapist each time he is referred.
Therapist to Referral (one to many) because one therapist could handle many referrals.
Now for the first patient, I entered the first patient info in the main form and then the referral and therapist info in the subform, then the same patient was referred to me for the second time, when I attempted to enter the second record (referral) in the subform I am not able to. Why I do not Know, I am sure I did something wrong.
By the way most of the fields in the subform are comboboxes except for dates.