Tables :: Numeric Field In A Table - Setting Field Property?
Nov 16, 2013
I have a numeric field (long integer) in a table. I've set the format to fixed. No matter what I set the decimal places to, auto, 0 or 2, when I enter a value of 0.71, it displays as 1.00
In my form, I've also set the field property to fixed, but it displays the value as 1.
I am using Access 2010. How to change the property of a field in a table programmatically.
I have a table in which one field has Required property set to "Yes". I would like to set this property by using VBA code to "No", then add data into a table using a query and re-set the Required property to "Yes".
Access 2010..One organization that we work with provides us with a block of numbers for each of the two types of contract products we order from them; we do order non-contract stuff from them also.The block of numbers are the same (i.e. 20000 to 30000 this year) for each of the two products. This means that each product can have the number 20000, for example. We call this the Tracking Number. If it is one of these products, we need to select the Contract Number.
For all other one off orders we have with them, we assign our own Tracking Number starting with 00001. This Tracking Number cannot duplicate unless it is one of the aforementioned two products.Both the Tracking Number and Contract Number are in the same table. The user selects the Contract Number from a form (connected to the Contract Number table that has all the details on the contract) and the Contract Number is populated in the same table that has the Tracking Number.Each order must have a Tracking Number (no null)..Not all orders need a Contract Number (null okay).The Tracking Number and Contract Number combination cannot duplicate.I tried setting the primary keys to more than one field in the table, but they cannot have null values.
If not... I have been working on Plan B.... an AfterUpdate on the form (either the form or a field... don't know yet) that looks at a query that only has results if there are duplicate values.
I have a table named: tblStudents I have a fields named Course and Basic Code Enforcement
Within the properties for Basic Code Enforcement, I have this as a Lookup row source:
SELECT IIf([Course]="Residential Inspector Multi-Discipline",1,"") AS Expr1 FROM tblStudents;
It is also set as Listbox, Table/Query
The main goal is to have the field RBasic Code Enforcemente show a 1 if the Course field is Residential Inspector Multi-Discipline. I have been at this all morning and I can not figure this out.
My access db is used to compile payroll time records bi weekly. The Work Hours table is used to hold two weeks of time records then they are archived to a history table. Each week has its own week ending date. I have been updating the default value of the week ending manually in the table field property in the table's design view. Is there a way to have a macro update this default value?
The current process is, open table in design view, update week ending default value, enter payroll time then change default value again for second week ending, enter payroll time. Report hours to accountant, archive table to history table.
I need some kind of function (I been told) that generates 3 different alphanumeric autonumbers in the same field when adding a new record, starting such field from A-1, B-1 and C-1 to infinite.Because the record gets inserted in the table with an append query and not manually through a form, I believe the function should be placed in the Default Value setting of the field.
I want to add a column to an existing table using the sql statement Alter table. The new column needs to be a yes/no type. The following code almost works but it only sets the column to a general logical type not specifically the yes/no check box .
Is there anyway to set a calculated field as the primary key? Or how to duplicate the value of a calculated field into a new field and set the new field as the primary key?
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.
I have tblDefaults that has only one record, containing default values. Next I have tblWebpages that has a Memo field that holds my html data. Lastly I have a Form called frmCreate with a field called Webpage. This Form is based on a tblCreate table.
Whenever I click a command button on my Form, I want to populate the Webpage field on my frmCreate Form with a template from tblWebpages. The template to chose will be based upon the WhichTemplate field in tblDefaults.
In brief, tblDefaults tells me which is the current webpage template and so the field should be populated with that html data.
how to set the Field Size in a new Table. I need the user to be able to type in 17 characters (as in a vehicle VIN). I don't want the user to have the ability to type in anything less than 17 characters or anything more than 17 characters.
I would like to change the property of a text box to Visible and Required when a user chooses a specific value in a drop down box of a different text box. Is this possible using a macro or some other way?
I export a query as csv to upload to another database on a web site. When that csv file has been exported I'd like the query to be emptied, so that the next time I export I don't export duplicates. What's the easiest way to do that?
I've been thinking of having a field in the table with a check box that is checked when the file is exported. The query then selects only those records where that box is not checked.
But how can I check those boxes on Export rather than when I run the query? The reason being that I may want to preview by running the query, without having that affecting the check box.
I am creating a database to keep up with the expenses for my art business. I have a table for Vendors with a field (Mileage) for one-way mileage that I enter manually (EX: 11.8 miles). Then I have a calculated field that basically just multiplies the Mileage field times two to get total mileage to and from my house to vendor location. (Total Miles) {The reason I want to do this this way right now is because I didn't keep up with my mileage this year and I am having to look up the distance from my home to each location)
Then I have a "supplies" table where I show the date, the vendor, the item, cost, etc, and I want to add a Total Mileage field based on the calculated Total Miles field in the Vendors table that will automatically populate based on the vendor of each transaction. I just can't remember how to make this work and I know just enough SQL to be dangerous.
I have started work on a database to track the many (several hundred per annum) projects my company undertakes. A 'main' table lists projects, their fees, their key dates, their project numbers, etc. I have created another table for tasks. Each task is assigned to a project (via the project number), and may be 'open' or 'closed'. I have separated the tasks table from the projects table as there may be several different tasks for each project. It is also good to keep a record of the tasks.
I want to prepare a report from the projects table that lists projects IF they have any open tasks.
In my mind, this means 'If a task, with the corresponding project number, is open, put a 'Yes' in the 'Tasks open' field of the Projects table.'
Within my table if Field 1 has an answer of Self (from drop down), then, I would like Fields 6-12 to auto populate; however, if Field 1 does not have an answer of Self, then leave Fields 6-12 blank.
I am not quite sure how to lay this out. I am using Access 2010.
the table 2 is the source of a form that will let the user change the numbers. table 1 should change Date1 and Date2 Fields based on the two fields (3months) and (6months) if i want to make a lookup wizard it should be changed manually and if i make a calculated field i can't find other tables in the expression builder
I have a main table which is autonumbered on unitid, I have another table which is linked via the unitid which holds items purchased for the main table, so the second table is a subform of the suppliers and will have multiple entries of the same unitid. What I would like to do is when an item is entered into the second table, check the main table to see if it exists, if it does populate the unitid field with the unitid from the main table, and if not exist create a new record in the main table with the next unitid number.
This in essence is what I want, bearing in mind that the tblinvoices is a subform and the tblmain is not open.
If ([tblinvoices]![Unit] = [tblmain]![Unit]) Then [tblinvoices]![UnitID] = [tblinvoices]![UnitID] End If
Trying to do the following: Having built a table of customers, I need to have an automatically generated ID number for each that IS IN ORDER - which rules out Autonumber and it's gapping tendencies. So, I've developed a new CustID field and set it to "Number", and now just need to figure out how to get it to pull the previous entry and add "1" to it. So it would look like this:
CUSTID NAME 1 Bob 2 Fran 3 Phil 4 Tom 5 (ready for next entry)
Any way to use a function I don't know about, or program some type of solution? Thank you
Guys, When I generate an excel sheet through vb.net code, I get a Numeric Field OVerflow when the values generated contain a date!
my database is ms access...
The problem is that each excel sheet generated has different columns, depending on what columns the user selects to view. for example: if the user chooses name, age and date, the date would appear on the 3rd column, if the user chooses name, nationality, age, family name, date, then the date would appear on the 5th column, etc.....
I have a query that prompts with a parameter box for the field Contributor_ID. Contributor_ID is a numeric field & Key and I use it to allow the user to print a report based on which Contributor_ID value the user enters. This works fine. However, I would like the user to have the option to enter * and then have the report include ALL the contributor IDs. I have done this before on a text field without a problem, however is this not possible on a numeric field as it is not working? I'm trying not to have another version for the ALL option.
If this is not possible, are there any alternatives?