Modules & VBA :: Add New Field In Every Table (100 Tables)

Apr 16, 2015

I inherited an old database. Not designed too well. Nearly 100 tables with different types of names. Some table names start with and "_", some with "tbl" and some just names.

I want to add a new field called "TimeStamp", date/time, and default value Now() to all the tables.

View Replies


ADVERTISEMENT

Tables :: Auto-populate Table Field From Calculated Field In Another Table?

Jan 15, 2015

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.

View 2 Replies View Related

Tables :: Update A Field In One Table Based On Status Of A Field In Another Table

Aug 2, 2013

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.'

View 7 Replies View Related

Modules & VBA :: Loop Through Tables Updating Field In One From Field In Other

Feb 6, 2015

I have 2 tables, "Counselors" and "Appeals". There are several names in the Counselor table but it is not a fixed number of names (rows) usually around 7. There is also some variable number of records in the Appeals table, could be 0, could be 50, depending on the day.

I need to, in a round robin fashion, assign the counselor names one by one to the records in the Appeals table. How to loop through the 2 tables and update the name field in the Appeals table with the name in the Counselor table.

View 1 Replies View Related

Tables :: Auto Populate Field Based On Answer Of Another Field In Same Table

Feb 28, 2013

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.

View 8 Replies View Related

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.

View 2 Replies View Related

Tables :: How To Make Calculated Field Based On Field In Another Table

Jun 18, 2014

Table1 contain Two fields (3Months) and (6Months)

Table2 contain Two fields (3Months) and (6Months)

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

View 1 Replies View Related

Tables :: Autopopulation Of Field From Another Table Based On Another Field Criteria

Dec 5, 2012

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

View 3 Replies View Related

Tables :: Pull Field From Main Table And Create A New Table With Date Stamp

Nov 4, 2014

I have a make-table query that pulls all the fields from 1 table (MainTable), and creates a new table with a date stamp based apon a form value entered (New Table = MainTableWithDate).

Currently, I setup the query to pull info from the form field like this:

DateField: [Forms]![frmmain]![DateField]

However, when the make-table query is done - all date fields are blank (all other fields are correctly created), and when I look at the new created table (mainTableWIthDate), the typeassigned to the date field is "Binary" (in the form, I've specified LongDate).

View 6 Replies View Related

Tables :: Make Calculated Field In One Table That Calculates Values From Another Table Linked By Order ID

May 13, 2015

I have what is probably a stupid question but I've been struggling with this one for a while. I have an ordering database which has an Orders table (containing Order ID, Date, Supplier etc) and an Order Line table within which I have a combo box for Product name, supplier, price, VAT rate, Line price etc. At the moment, I have the order line table as a subform within the Order form (run from the Orders table). The problem I'm having is the subtotal and total fields. At the moment these are in the Order Line table as I cannot figure out how to get these in the Orders table. In summary, can I make a calculated field in one table that calculates values from another table (linked by Order ID)?

View 3 Replies View Related

Tables :: Update A Field Of Table A By Entering Data On Table B

Sep 14, 2012

Some days ago I made it by using "query", but now I forget it how I make the relation on this situation. Here is my problem.I have 3 Table on mdb file, named Table: A, B, Status.Table Status have One Filed with 1 Data: Dishonor

Table A have three fields

Sl Number: (Auto Number)
Status: Lookup wizard-data of (Table-Status)-Default Value is "Honor"
Amount:Number

Table B have two Fileds
Sl Number: Number
Status: Lookup wizard-data of (Table-Status)

After Entering Some data on Table A it's Look like as:

Asl numberstatusamount
1Honor5222
2Honor855
3Honor988
4Honor7777
5Honor777
6Honor9999

[code]...

Now I want to change the Status of SL Number Honor to Dishonor so I fillup data on Table B is as like following

sl numberstatus
5Dishonor

Now how I can get the result as following by using query:sl numberstatusamount
1Honor5222
2Honor855
3Honor988
4Honor7777
5Dishonor777
6Honor9999
7Honor6666
8Honor7777
9Honor666

View 1 Replies View Related

Modules & VBA :: Code To Check Contents Of A Field In A Table Where Another Field

Sep 11, 2013

I am trying create some code that checks if the contents of the status field in a table is "Authorised" where the ID = something specific for multiple records. If all records witht the specific ID are "Authorised" Then generate a new record in another table. Where to start, perhaps a Dlookup?

View 1 Replies View Related

Modules & VBA :: Updating A Field In A Form Based On Another Table Field

Sep 13, 2013

Using Access 2010. Fairly new to automation and macros.I have two tables (tblProductReceived and tblBins) and a form (frmProductReceived).A field in tblBins corresponds to a location the bin is at (named BinLocationID) and the tblProductReceived table tracks product that a specific bin has received.

What I need is for the tblProductReceived field PRLocationID ([tblProductReceived].[PRLocationID]) to be automatically populated with where the bin is at ([tblBins].[BinLocationID]) when selecting a specific bin in the form (frmProductReceived).

View 1 Replies View Related

Tables :: Possible To Have The Field Names In Table Be Set By Values In Another Table?

Jul 27, 2014

Is it possible to have the field names in a table be set by the values in another table? The desire being that for a database used in various locations, the local variations could be changed in one table which would then propagate that change throughout all the forms, reports, tables etc.

View 14 Replies View Related

Modules & VBA :: Restrict Value In Lookup Field To Only Include Values From Table B Not In Table A?

Feb 2, 2014

I have a database that has 2 tables. Table A and Table B. Table A is my primary table. On this table I have 2 fields. The first field is a LOOKUP Field that looks up information from Table B and displays my selection in the field on Table A. Then using DLOOKUP I automatically input the information in the Second Field on Table A based upon the selection from the First Field.

This is working mostly correctly. However, the problem is, when I click on the next record in the table, it automatically changes the Second Field on that record to the same value as the record before it and continues this trend each time I click on another record. This occurs without me making a selection in the first field. If I make a selection in the first field it does change the Second Field to the Correct Value, but then the next Record has the same issue.

How do I go about fixing this so it doesn't change the value with the change of the record. Only change if I change that particular field within that 1 record?is there a way to restrict the Value's in my lookup field to only include the Values from Table B that aren't already in Table A?

View 5 Replies View Related

Modules & VBA :: Append Data From Several Tables To One Table

Feb 14, 2014

I have the following code, the purpose of the code is that to take all rows from each table to append them into one table. However, I am testing this code with 2 tables (Table2 and Table3) each table has 2 records, when I run the code, it keeps adding records to table 1 that exceeds one million. what is wrong with my code?

Dim tblString, I As Integer
Dim rstFrom As Recordset, rst2 As Recordset
Dim db As Database
Set db = CurrentDb
Set rst2 = db.OpenRecordset("Table1", dbOpenDynaset)

[Code] .....

View 3 Replies View Related

Modules & VBA :: Building Temporary Table Using Records In Two Different Tables

Sep 23, 2014

I'm making a library database program thing... There's an option for the user to view all books on loan.

I have two tables:

Books, which has columns ID*, ISBN, Author, Title, Year, Location
BorrowerStorage, which has columns Book ID, Name, Email Address, Desk Number

Book ID in BorrowerStorage is related to the Books primary key.

Now, for the viewing all books on loan, I want it to produce a read only table which contains all the entries from the BorrowerStorage table and the corresponding Title/Author columns (i.e. the records for which the ID in Books column = BookID in Borrower Storage column)...

View 5 Replies View Related

Tables :: Get Rid Of Calculated Field In A Table?

Sep 13, 2013

I've learned the hard way about using calculated fields in a table. I used on while building in Access 2010 for users that will be using Access 2007. Once my testers pointed out the error message, I did some research and realized my calculated field was the problem.

So, I created a query to replicate the calculation, deleted the offending field from the original table and redirected everything to point at the new query vice the original table.

However, my testers are still receiving the error about needing version 14 to access that table. There isn't a calculated field there any longer, but they still can't access that table. Did that calculated field put some sort of taint on my database that can't be removed? I'm not sure what to do. Do I need to start over, so that a calculated field was never part of the database to begin with? If so, how much of my existing one can I reuse?

View 6 Replies View Related

Tables :: Timestamp For Table Field

Feb 19, 2014

I would like to have a time stamp for each record showing the creation time/date of the record. When following the description: [URL] ....

the outcome is, that each record shows the creation time/date of the record created before, which is not exactly what I want.I know this can be handled on form level (in the AfterInsert event), but I think it would be more elegant on table level. (Because obviously it has to be done in every form if there are multiple forms for the same table, and I it wouldn't work if somebody bypassed the form)

View 3 Replies View Related

Tables :: Rename A Table Field Name

Apr 18, 2014

I was working on my DB, cleaning up some of the field name that were cumbersome and everything worked fine. Today I was doing some follow up work and I cannot change the field names. All I want to do it change the name of a field from CITY to City, but it won't let me do it. I have tried, change from single click to double click, but I was already using double click to open an object; unchecked Auto-Correct, still nothing.

Yesterday I was able to modify a name from Actions to Action (simply deleting one letter. And State/Province to StateProvince. Worked fine. What bothers me is that I have been able to change a field name before and now I can't. I have tried compact and restore, etc.

View 14 Replies View Related

Tables :: Adding Value To A Table Field

Mar 20, 2014

I am building a DB for my college, it is needed to replace a spreadsheet they have in place. The spreadsheet is used to monitor and track Students grades.

Each unit a student passes gives that student a certain number of points, the number of points depends on the grade (e.g. a student will get more points for a B than they would for a C). The point of the DB is to input all the students grades so that student can see how many points they have.

I was wondering if there is a way to add a value to a field, so if I put in a field that a student got a B grade the database would know how much a B grade is worth points wise. Each field should be added together to generate an overall score. Is this possible?

View 1 Replies View Related

Tables :: Look Up Reference For Table Field

Dec 5, 2013

When entering a lookup reference to a table field it pop up message saying, "you can't modify the table 1 this time as it is in use by other person or process" i have closed all forms and table reports but the problem is same to rectify ? also when going to see the realationship then there shows no relation ship developed even after the lookup reference from one table filed to another table field.

View 1 Replies View Related

Tables :: Add Existing Field From One Table To Another

Apr 8, 2013

I am trying to add an existing field from one table into another table but the table Im currently in shows that option to be greyed out. What would cause that option to be greyed out?

View 2 Replies View Related

Tables :: Can't Change Field Name In Table

Sep 18, 2014

I am trying to change the name of a field in a table. When I hit save, it gives me the error:"Could not find field 'originalFieldName'"..I hit OK and it says: "Errors were encountered during the save operation. Properties were not updated."

There are no queries, forms, reports, or relationships shown on the relationships tab. The other fields in the table have drop-down menus of values stored in other tables, but not this field. It just has values I entered in it manually.Why can't I change the name of the field? I have Access 2007.

View 1 Replies View Related

Tables :: Formatting A Table Field?

Mar 31, 2013

In a table, I would like a particular field to look thusly:

xx-xx-x-x-x

My question is how do I format it so that the dashes (-) are automatically inserted when the data is keyed into the input screen. The dashes would also have to be displayed on the table.

View 2 Replies View Related

Tables :: Reference A Table Field

Apr 10, 2013

I have two tables, Table 1 and Table 2 and two related forms, Frm1 and Frm2. I want to be able to update the data on Table1 from Frm2, that is, if I change the data on Frm2, the corresponding fields in Table1 will update to the same data. I know that if both tables are open I can reference the fields on Frm1 and Frm2 with an IF statement: If Active = True And Forms!Frm1a.DoNotchange = False Then..And I know on the update query I can reference a control on a form by Forms!Formname.Control. Wll works fine.What I would like to know is can I reference a table field in the same way. For example, I have tried to use the IF Statement If Active = True And Tables!Table1.DoNotchange = False Then..Is there a way to reference the Table instead of the Form in both the VBA and the query? The problem seems to be that I have the two bound controls [Active] on Frm2 and [DoNotChange] on Frm1. (Which I need).

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved