General :: Transferring Data From Table To Another Under Conditions

Feb 22, 2013

I have 3 tables :

table 1 empno Employee Nomber
empname Employee name
salary basic Salary
bonus
deduction
iddate month nomber

table 2 is bonus table id
empno
bonus amount
iddate

table 3 is deduction tableid
empno
deduction amount
iddate

Now i need is to transfer the data from bonus table and from deduction table to the table 1 if the empno and iddate are equal on the both tables

What I mean for ex if i create query and when i enter the employee number directly it will give me his bonus if he has and his deduction also if he has, so how can i do it?

View Replies


ADVERTISEMENT

Transferring Data From One Table To Another

May 2, 2005

Hi all. Hopefully this will be a simple thing...What I have is one main table (RFA Main) and two related tables (S/R Disposition and Suppliers). RFA Main has a two check boxes (ScrapRewrk and SupActs) that I am using to trigger append queries that append the following SQL statement:
Suppliers table
INSERT INTO Suppliers ( LogNum, Originator, ReportDateOp, PartNum, PartNumDesc, ProbDesc, CustRtn, RmaNum )
SELECT [RFA Main].LogNum, [RFA Main].Originator, [RFA Main].ReportDateOp, [RFA Main].PartNum, [RFA Main].PartNumDesc, [RFA Main].ProbDesc, [RFA Main].CustRtn, [RFA Main].RmaNum
FROM [RFA Main]
WHERE ((([RFA Main].SupAct)=True));

S/R Disposition table
SQL the same except for the WHERE statement reads ((([RFA Main}.ScrapRewrk)=True));

First, what kind of statement would I use to trigger the append query when the boxes are checked? Currently, the users are doing these append queries manually by clicking command buttons.

Second, is there an easier way to do it?

Thanks in advance

Camille

View 14 Replies View Related

Modules & VBA :: Pull Data From A Table That Meets Number Of Conditions?

Jul 3, 2014

I have a module that is in Excel that is connecting to a back end database. I am trying to pull data from a table that meets a number of conditions. With the following statement, it is not returning any records,even though I know there are records that meet all of the conditions. I suspect the problem is with the last condition. In that condition I am trying to say that pull in records where it has been at least 14 days since the last review.

Code:
strSQL = "SELECT tblsojrol_oc.* FROM tblsojrol_oc WHERE tblsojrol_oc.[Status] = 'Pending' AND tblsojrol_oc.[1st Review Date] IS NOT NULL AND " _
& "tblsojrol_oc.[3rd Review Date] IS NULL AND (DateADD(Day,14,tblsojrol_oc.[2nd Review Date])) >= #" & dt & "#;"
objRs.Open strSQL, objConn, adLockReadOnly

View 14 Replies View Related

Data Not Transferring

Apr 6, 2008

Hi, I'm running 2 append queries to my existing db to update fields in one table with data from 2 sources - basically plucking some fields from one and some from the other (using a client ID number as the common identifier - the data is fed into the parent table). However, it would appear that some of the data is not transferring into the parent table even though it is visible in the source file (.xls). I know that this seems like a broad request but I'm just wondering if there may be a potential simple error. Any ideas?

Cheers....

View 2 Replies View Related

Data Not Transferring

Apr 7, 2008

Hi, I'm running 2 append queries to my existing db to update fields in one table with data from 2 sources - basically plucking some fields from one and some from the other (using a client ID number as the common identifier - the data is fed into the parent table). However, it would appear that some of the data is not transferring into the parent table even though it is visible in the source file (.xls). I know that this seems like a broad request but I'm just wondering if there may be a potential simple error. Any ideas?

Cheers....

View 4 Replies View Related

Transferring Data To An Access DB

Jul 16, 2007

Does anyone know if it is possible to transfer data from an old MSDos database into an Access 2003 one?

If so any idea how you would go about doing this?

Thanks in advance.

View 14 Replies View Related

Transferring Data To A Second Form

Dec 15, 2011

I have created a database that deals with inventory control. My next step that I have been approaching is to click a command button that opens up a separate from but takes specific information from FORM 1 into the new FORM that I just created.

So if a specific Employee takes out 4 aprons from a total of 50 and there are now 46 left, I would like the submit button to transfer that data over accordingly to Inventory control form in the correct text boxes.

Specific Example: If employee John Doe takes 4 aprons from a total of 50 which now leaves 46 how can I transfer that data into the other form showing specific information like 'Product ID' taken, 'Date' it was taken, 'Product Description', 'Employee' who took it, 'Amount Taken' and, 'total' left. I need the extended information to show up in the text boxes on form 2.

Is there a certain code that does this? Here are screen shots so you can get a visual....

View 2 Replies View Related

Transferring Query Data To Excel

Mar 28, 2008

Not sure how easy this one will be but here goes.

I currently have a database which collects details of event effecting our business and am using a simple query that displays events within a defined date range.

I have also set an excel sheet which on the main worksheet appears as a calender format for a particular month which is updated by data in the access query. At the moment I tranfer the query to excel and it appears as a new sheet which I then have to link to the master calender.

Is there any way when exporting to excel to tell access to send the data to a particular sheet and cell range and even more advanced tell it were to put certain dates information? i.e send 1st March info to cells A1 to A4, 2nd to A5 to A8 etc.

Hope someone has some ideas on this one - even being able to send all data a specific cell range would be useful

View 2 Replies View Related

Transferring Same Data To A Field In All Records?

Aug 10, 2006

I suppose that´s easy, but I only accomplished one by one by selecting a specific record.


Ty

View 4 Replies View Related

Forms :: Transferring Data From One Form To Another

Mar 3, 2014

I have one form that is serving as a popup while the parent form remains open... in my code for the popup I'm trying to transfer the value of a textbox to the actual textbox on the parent form... seems easy, but I get this message: "You can't reference a property or method for a control unless the control has the focus" with this code:

Private Sub btnExportData_Click()
[Form]![Worksheet]![txtBookedNotBanked] = Me.txtTotal1.Text
End Sub

... also is there a way to code this so the popup closes when the transfer is made?

View 5 Replies View Related

Forms :: Transferring Data From One Form To Another

Dec 14, 2014

I have a form (frmJob) that has a combobox (cmbCompany). If a new company is not in the table the NotInList code opens another form (frmCompany) and a new company is added into the textbox (txtCoName).

The code below is the code that closes the frmCompany after entering new company.

The first part of the code (Add new company into table) works and adds the new company into table but the second part (Add new company into frmJob) does not, and the new company does not appear in the cmbCompany combobox. Note: frmJob remains open while data is entered into frmCompany.

How can I get the second portion of the code to work?

Code:
Public RemCompany As String
Private Sub cmdCloseCompany_Click()
"FIRST PORTION - Add new company into table
Dim dbCom As Database
Dim recCom As Recordset
Set dbCom = CurrentDb

[Code] .....

View 4 Replies View Related

Transferring Data From Word To Access?

Sep 6, 2011

Is there a way to transmit data from an MSWord Form to an Access table?

View 6 Replies View Related

Transferring Data From MS Excel To MS Access 2013

Mar 27, 2014

I am setting up a database using Access 2013, and am trying to test downloading files from Excel. For some reason it is not allowing me to have more then 4 columns in the excel file, it gives the error "Subscript out of range". I thought it was the type of variable at first, but when I tried deleting different columns on both files, the transfer always worked with 4 columns. How do I allow more columns to be transferred?Also, is there a way to not include the row numbers of the excel file as an ID column and only include the ID given in the first column?

View 4 Replies View Related

Transferring Data To Another Access Database (before Delete)

Aug 16, 2013

I have a database with a main database that has 2 related tables...my problem is that i only keep data that i really need, in the main table. My problem is that i sometimes need to go back to old data that i erased. so i have to keep old data too. but i can;t on the same database. so i need to move the old records from the main table and all the related data to another database that will keep all the erased data, so if i need to find something i will search on the "deleted records" database.

View 6 Replies View Related

Data Calculated On Forms Not Transferring Back To Tables

Nov 27, 2006

I understand that any data that is inputted into a form is always transferred back to the table in question.

In the form I created, I had

4 subheading scores added together to form another subheading named function =([1]+[2]+[3]+[4])/4 was the formula that I put into the control source. The calculation worked fine on the form giving me the correct name. However, this number did not transfer back to the table simple being labelled as zero. Can someone please advice!

View 14 Replies View Related

General :: Cumulative Balance Of Items Purchased Conditions

Dec 29, 2014

I hope this amendment to the code for the file attachment that doing a cumulative collection of the items purchased, but only "product code and place of storage," where the code works efficiently with the condition class code but I can not be modified to work two conditions together.

View 2 Replies View Related

Compare Data In Two Tables, With Multiple Conditions…..

Aug 25, 2005

Been trying to crack this one for a while hoping someone on here might be able to help me. ;)

I have a table with a list of required software and a table with a list of computers and the software installed software. I made a query that displays the machines with the required installed. My problem is if a machine has more than required then it does not display the record. If it needs Office, Photoshop but has office, Photoshop and quark installed then it does not display that machine.

This should be quite a simple thing, I have played with Like, NOT, Where and others but with no luck...

Any help would be greatly appreciated.

Graeme

View 2 Replies View Related

Multiple Match Conditions In A Unrelated Table

Jan 31, 2007

Hi All,

My database has two tables:
1. Complete Address Data
2. Address conditions.

Table 1. has verbose customer [address] data like 11 smith st, 14 Kent Rd etc.
Table 2. has [std] address conditions, ST, RD, Street, Road etc.

How can I query ALL records by field [address] in table 1 by using ALL [std] address conditions in table 2?

The address conditions can occur anywhere in the [address] string, so I was thinking about maybe a CONTAINS condition, but I'm not sure

View 2 Replies View Related

Modules & VBA :: Automatically Repeat Last Record Under Certain Conditions In A Table / Query

Jul 15, 2014

I’d like to repeat the last not = 0 record under certain conditions, in a table or in a query.What I have:

Calendar_All Dates
Calendar dateMyValue
7/6/20140.00
7/7/2014108.94
7/8/2014107.71

[code]...

Basically, if Calendar date > Date(), if Calendar Date not Saturday or Sunday, weekday(Calendar date<>1 and <>7), AND Calendar Date not in (Holidays table).Then repeat the last not = 0 value of MyValue. I thought of changing the default value but the value is already 0, while default is null + I need to set the default value under certain conditions.

View 14 Replies View Related

Transferring Data From Form To Form When Starting New Record

Sep 7, 2011

OK so my situation is a simple 1 to many relationship where the main form has the primary key and the secondary input form needs the foreign key to be passed to it to link the 2 tables.

Say for example 1 Site has many sections (Plants). The main menu form can therefore select the Site and filter to another combo box containing the plants that are attached to that site. The user can then either edit the plant or add a new plant record linked to the site.

I have figured out how to edit the plant attached to the site using a macro that opens the form Plants with the site ID passed from the main form however when I want to enter a new Plant I still need the site ID passed to the Plants form however using the following code

DoCmd.OpenForm "frmPlants", acNormal, , , acFormAdd

It simply opens the form as a new record and therefore will not transfer the SiteID

No doubt this is not the hardest thing to do I just can't work out how to do it

I have seen somewhere using code similar to this

stLinkCriteria = "[SiteID]=" & Me![SiteID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

But I can't seem to get it to work.

View 1 Replies View Related

General :: Updating Table Data With Data From Preceding Entry?

Jan 5, 2013

My question is this: I have a table where I'm entering employees' hours worked. Basically, it's something like this:

ID WorkerNumberDateworkedTimeStartTimeEnded
121/2/201310:00:00 AM3:00:00 PM
221/3/20132:00:00 AM11:00:00 AM
321/4/201312:15:00 AM11:30:00 AM
421/5/201310:25:00 PM11:00:00 AM
531/2/201311:00:00 AM3:30:00 PM
631/3/201312:00:00 PM10:00:00 PM
731/10/20137:00:00 AM4:00:00 PM

I have a query that (easily) determines how many hours an employee has worked on any given day. What I can't figure out at all, is how to write a query that can figure out how much time an employee had off in between shifts.

Thus far I'm able to run a query that separates this main table into individual workers by their id numbers, but can't figure out how to determine time off between shifts - as the last hour worked one day, and the first hour worked the next day are on two different lines (they are two different table entries).

View 4 Replies View Related

General :: When Transfer Data From Table In Excel To Table In Access / It Loses Format

Jan 29, 2015

When I try to transfer (ctrl c + v) data from a table in Excel to a table in Access it loses format.

Exemple: $ 1.000,00 (Excel) become 1000 (Access).

I need to keep the format to make sure that the code works properly.

View 9 Replies View Related

General :: Copy Data From Local Access Table To Linked SQL Server Table?

Jan 13, 2014

I have an MS Access accdb with linked SQL Server 2012 ODBC tables. I am working on a procedure to copy data from local tables to these linked tables (identical schema). I did a simple

Code:

DoCmd.RunSQL "INSERT INTO linkedTable SELECT * FROM localTable"

This works, but is very slow. Way too slow. (INSERT copies the data one record at a time).

I would like to copy the data in a bulk operation, or operations that I can execute programmatically.

View 1 Replies View Related

General :: Possible To Have Data From Linked Table Automatically Update Into Existing Table?

Aug 17, 2012

I have one DB that is used for creating/storing customer ID's, and another DB that is used for creating/storing job information for customers.I have linked the table from the customer DB to the job DB.

There is a table in the job database that holds customer name and ID, and some VBA that generates unique job codes.

Is it possible to have the data from the linked table automatically update into the existing table?

View 1 Replies View Related

General :: Importing Data To A Table And Appending To Another Table

Aug 24, 2014

I have to import a file from an external website into a table (tableA) that I have established. The issue is that I don't need all that data, just specific ones (the website does not allow me to select the specific data to export). I created another table (tableB) to capture the data that I require for my report.

How do I take raw data from tableA to append to tableB the required fields that I want?

View 3 Replies View Related

General :: Insert Data Of One Table To Another?

Mar 10, 2014

Inserting data from History Table LIKE "P" Type into Preventive Maintenance Table and LIKE "R" Type into Repair Table.

I don't quiet get it because it says "PM Data Update" but nothing happened. Below is the code:

Code:
Private Sub cmdUpdate_Click()
Dim strSQL
Dim dbMNT As Database

[Code].....

View 6 Replies View Related







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