Copying Multiple Records

Nov 6, 2006

Hi all!

I need a little help with a new function in our CRM db (Ac2000).

I've made a system for handling sale-prospects. When a sale is done, I want to transfer the costumer info to the costumer table. All this is well, no problems with this.

BUT, each prospect (And costumer) has contacts. There can be several contacts to each prospect, connected with a prospect number.

The challange is to transfer the contacts as well. And assigning the new costumernumber..

Dont bother going techincal right away, but a point in the right direction would be great!

View Replies


ADVERTISEMENT

Queries :: Copying Multiple Records From One Table To Another

Sep 7, 2013

I'm using Access 2007.I have 2 tables that are identical in structure.The tables are called [Workorder Parts] and [Workorder Parts Temp]. They both have the same structure:

WorkOrderPartID (Autonumber)
WorkorderID(Number)
PartID(Number)
Quantity(Number)
UnitPrice(Currency)
Notes(Memo)
KitID(Number).

[Workorder Parts] has 128 records in in and [Workorder Parts Temp] has 28 records in it that are a small subset of [Workorder Parts] therefore, the contents of the key field column in [Workorder Parts Temp] is the same as in [Workorder Parts].I tried the following SQL but get an error message saying "Cannot Update "WorkOrderPartID" Field not updateable":

DoCmd.RunSQL "INSERT INTO [WorkOrder Parts] SELECT * FROM [Workorder Parts Temp]"

My aim is that I want all of the records from [Workorder Parts Temp]to be copied to [Workorder Parts] and have their "WorkOrderPartID" fields correctly updated with a new value...

View 14 Replies View Related

Forms :: Copying Multiple Records From One Table To Another And Other Stuff

Sep 5, 2013

It basically is used to create, manage and track Customers, Parts, Work Orders and Suppliers, payments and employees.You simply create a Customer and then create a Work order that contains a list of parts and labour items.

What I want to do is to create a "Kit" of parts so that the user does not have to select each part individually when they create a Work Order. For example, if I use a mechanics workshop as an example, the mechanic may sell his "Signature 1916cc Engine" that consists of 40 different parts and some other items such as labour and other services. In this scenario, instead of the user individually selecting 40 different parts, all he needs to do is select the Kit called "Signature 1916 cc Engine" from a drop down list and all of the 40 parts and other items would automatically populate the correct Work Order Parts/Labour tables.

I would also like the user to be able to select another "kit" that would either replace all parts and labour records or append to what is already there.

I have changed the form called "Workorders" to have 2 buttons. One called "Load Kit" the other called "Save Kit".If the user presses "load Kit" a form will be displayed that enables them to select a "kit" from a list and whether they want to replace all of the existing parts and labour records or if they want to append to the existing records.

In order to create a new kit, the user can simply manually create a new work order by individually selecting each part and labour item and then pressing the "Save Kit" button. The user will then be asked to provide the short name of the Kit and the long description (I have created table called tKit). The new kit will then be saved.

It appears that the "Entered by" field that is linked to the Employee table must not be blank other wise the Workbook is NOT saved....I have tried to figure out why this is happening but can't!

The Work Order Parts are stored in "Work Order Parts" and the Work Order Labor is stored in a table called "Work Order Labor". I have created 2 extra tables called "tKitWorkOrderParts" and "tKitWorkOrderLabor" that I assume will contain the items that make up the kits..

View 14 Replies View Related

Copying Records To A New Table

Feb 16, 2005

I am trying to help a new employee with an MS Access 2000 problem. The db was created years ago, and the main table (permits) needed some major changes. She created a new db with a table that has all the same fields as the old db, but many new ones as well. We want to now import the data from the old db's "Permit" table to the new db's "Permit" table. All the field names are correct, but we keep getting errors trying to import and export. There are approximately 940 records.

Is there an easy way to do this? Thank you!

Mike

View 1 Replies View Related

Copying Records Based Off Of Conditions

Jul 8, 2006

Hello. Can this be done?

I am creating a mini scheduling program, and I have one table that handles all requests (tblRequests), then a second table is the final schedule (tblFinalSchedule). On the table for the requests, I have a field called "locked" that is of type yes/no. The purpose of this field is for a meeting time that is of uptmost importance and that I don't want the program to manipulate it in any way.

Is there a way to program in VBA so that when a button on a separate form is clicked, those records that when the yes/no field is checked (set to true), are copied into the appropriate fields from tblRequests into tblFinalSchedule?

View 1 Replies View Related

Forms :: Copying Data To A New Record - Skip Null Records

Aug 13, 2013

I've created some code that enables a user to copy an existing record to a new record, which looks like this:

Private Sub btnCopytoNewRecord_Click()
Dim Salutation As String
Dim First_Name As String
Dim Surname As String

'Copy fields to variables
Salutation = Me.Salutation

[Code] ....

This code is working fine, until it hits an empty field, and then I get an error message: Run time error '94':

Invalid use of NullIs there some code I can use to tell it to skip any null fields?

View 2 Replies View Related

Modules & VBA :: Copying File To Specified Folder And Updating Records With New Location?

Jan 28, 2015

I'm currently working on a database to track and inventory documents in my organization similar to a library catalog, but with a digital archive as well. I'll need the ability to "attach" documents to records in the main inventory (though using links instead of storing it in the db) and have the documents live in a centrally accessible location on our shared server.

I will need to have this function work through a few different tables and in a few different iterations, but I'm trying to work on the simplest part first, which is attaching a thumbnail/preview of a given document to the record for that document.

I've got some VBA working well which opens the file picker and copies the file to a directory relative to the DB. It also creates a folder with each employee's ID number if it doesn't exist already (which it gets from the Windows log in) and adds "Copied_" to the front of the file.

Now I'm trying to get the VBA code to interact with the record. Presumably I need to tell the form button I'm using to launch the VBA code to pass the primary key of the record being displayed to VBA. Then, at the end of the VBA code I need to take that value and find the record again from VBA so I can update the MediaThumbnailLink in the original record.

Does this order of operations make sense? If so, how should I go about passing these values back and forth and writing the new link value?

Here's the VBA I'm using so far...

Code:
Option Compare Database
Public Sub GoCopyThumbnail()
Dim fDialog As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
Dim varFile As Variant
Dim LUser As String

[Code] ....

View 2 Replies View Related

Modules & VBA :: Copying Records From Linked Table / Each Record Slower And Slower

Jul 30, 2015

I have an access db with a linked table (to Sharepoint) which contains about 15000 records. I have to copy those records to the local access db. To do this I have a bit of VBAcode. It works, but for each next record that is copied it takes a bit longer. When starting the program the records are copied quite fast, but soon you see it slowing down until after a couple of thousand records it just goes too slow to be usefull, meaning it would take a lot of days to copy all records.

What I now do is let it copy 500 records and exit ms-access completely and then start it again and let it copy the next 500 records. This works but is tedious as I have to do it about 35 times. Why this gradual slowdown occurs?

The VBA code is pretty straightforward.(I use VBA because I do a bit of data wrangling while reading in the values of the records)

Code:

Dim importdb1 As DAO.Database
Dim rsimportdb1 As DAO.Recordset
Dim i As Double
Set importdb1 = CurrentDb
Set rsimportdb1 = importdb1.OpenRecordset("2015")
Set rsMain = CurrentDb.OpenRecordset("tbl_import")

[code]....

View 3 Replies View Related

Modules & VBA :: Inserting Multiple Records From Multiple Unbound Text Boxes

May 6, 2014

I have a form with 15 unbound text boxes (daily temperatures) and what I am trying to do after entering the temperatures into the text boxes the user clicks an add button which will add 15 new records into the temperature table

the code I have started off with is

Code:

CurrentDb.Execute "INSERT INTO ColdTemperatures (ProductID, ColdTempDate, Temperature) VALUES (" & Lettuce & ", #" & Me.RealTime & "#, " & Me.Lettuce & ")"

which adds 1 successfully however if i repeat the code above for all 15 this Im assumming will create a potential bottleneck and slow the system down

is it possible to add all 15 records at once? do you think Im going at this the right way

View 5 Replies View Related

Queries :: How To Count Records Based On Multiple Criteria From Multiple Tables

Jan 4, 2014

I need to count records based on multiple criteria from two different tables. I have two tables (i.e. "tblTasks" and "tblTaskHistory"). The tables have a one-to-many relationship based on the "TaskID" field. "tblTasks" has a field called "AssignedTo" and "tblTaskHistory" has a field called "TaskStatus". I need to know how many tasks have been "reopened", the "reopened" status is located in the "TaskStatus" field in "tblTaskHistory". I need this count against a unique listing of employees which can be found in the "AssignedTo" field in "tblTasks".

View 4 Replies View Related

Copying A Set Of Records Across Several Tables To Same Tables With A Few Changes

Apr 8, 2015

There is one main policy table, and a collection of related tables that store information associated with each of the policies (coverage amounts, agents, etc). What I'm struggling with though is where they renew every so often (most times it's each year, but some go three or more years). Because I need the database to show everything EXACTLY as it was on each policy term, even expired ones, I don't want to just edit the existing records when policies renew; I need to create a copy of the ENTIRE record (across all related tables), but with a new PK, and the ability for users to change a few items, such as the policy number and effective dates.

There are two keys that I use to identify policies: one is the PK, which is an auto# that will need to change, and the other is a small text ID set when the policy is first issued, in order to make sure that even when policy numbers change from year to year, we can always track the history, so of course that one will need to remain the same. If I have the user click a "Renew" button on the policy view form that goes to a small form that takes what changes I want to allow and converts those into variables, could I then use those variables in a query, and have it copy all of these related records, with the other tables taking the new PK from the main table to keep the overall policy record linked?

View 4 Replies View Related

Tables :: Linking Records In One Table To Multiple Records In Another And Assign Percentage?

Nov 21, 2012

I have a table (tbl Team Info) which contains names and codes for teams within my business (>400 records) and another table (tbl Process) which contains a list of high level tasks (30 records).

I need to create something where for each team name 9in tbl Team Info) I can map them to the tasks that they undertake (in tbl Process) and assign a percentage of time then spend on each task. Each team could map to several different tasks.

View 3 Replies View Related

Combining Multiple Tables With Multiple Records

Jul 16, 2007

Here is the situation that I'm hoping that someone can help me with. I'm working with a database that tracks our condo units - from prospect coming into the system until we close them as a buyer. All the units are setup in the system so a salesperson will select from the units available. All that works fine when I create reports. The problem is trying to get the parking and storage on the same reports with the unit information. The problem is that there are multiple parking/storage units "attached" to a single unit and I cannot figure out how to get them to all appear on a single row of the report. As an example -

I have units A, B, C
Parking units p1,p2,p3,p4,p5,p6
Storage units s1,s2,s3.

Unit A uses parking units p1, p2, p5 and storage unit s2.

Unit B uses parking unit p3 and storage unit s1.

Unit C uses parking unit p4, p6 and storage unit s3.

How do I write a query/report that would show:

Unit Parking Storage
Unit A p1, p2, p5 s2
Unit B p3 s1
Unit C p4,p6 s3

Thanks,
Chester Campbell
ccampbell@jfreed.com

View 3 Replies View Related

Queries :: Put Multiple Records In Multiple Columns

Jul 31, 2013

I have three tables. Risk, Names and RiskAndNamesJunction table. I have the junction table because I have many to many relation (meaning many people can be connected to one risk and many risks can be connected to one people).

The problem is that If I make a query to show the people related to the risks, if there are many people for one risk then it will put the people in different rows. Meaning that for risk 2 I will have three rows, because there are three people connected to this rows. See the attached file!

What I would like to do is to have a query which (in case there are more than one risk owners) puts the second name in another column, the third name in another column and so on. So I will have only one row per risks.

The attached file is a dummy file, so there are only maximum three names per risk. In the real file the maximum is five names per risk. So I am talking about no more then five extra columns. (So I am talking about a query which would put the first finding in the first extra column, then the second item in the second and so on till five. It there is no third or fourth or fifht item then the columns remain blank).

Unfortunately I have to do this because our mother company works with excel and they are sticking to this format in excel.

See the attached file ....

View 2 Replies View Related

Linking Multiple Records To Single Records

Apr 22, 2013

I have a database with a table with company names, then a relationship to another table that shows that companies' address, but I also want there to be an address 2 and 3 and so on, and some of our companies have multiple sites.So what Im asking is how would you be able to show multiple data, on a sing record.

View 3 Replies View Related

Query To List Multiple Records In A List From Multiple Queries

Jul 11, 2013

I have a DB where you there's 5 tables all linked together by one project ID

tables below

Project , Staff, Asset, allowances, travel, mark up

What I can do is create a new project, then add records to each of the other tables on what different items I require,

i.e. I create a new project - called project one, in the project table I create a record stating, name, time scale, client and location, then I add different records to each of the other tables on what I require all linked to the same project ID. (probably not explained that too well)

Now I want to create a query that lists all the requirements one after the other this will make it easier to create reports and to calculate costing's.

At the moment I have made 5 different queries listing all the data, then have one report containing 5 sub reports to display the data, no this does work.

View 7 Replies View Related

Re-using 1 Value In Multiple Records

Jun 27, 2005

I am trying to manage a contract price from month to month. Every month, some portion (or none) of the total contract will be completed. I have a form in which the user enters 'Amt Completed this Pay Period.' Then the 'Total Completed To Date' is automatically calculated by adding the 'Amt Completed this Pay Period' to the 'Previously Completed Amt.' I would then like to use the new 'Total Completed to Date' as the next months 'Previously Completed Amt.'

Basically, I am trying to calculate a value in a form for one entry, and then passing that value to another entry to use. Does anyone know how I would pass this info along?

View 3 Replies View Related

Getting Rid Of Multiple Records

Dec 12, 2006

Hi Folks,

I'm doing a Schedule Adherence Report in Access. One table has the schedule start time and stop time. The second table has exception times (lunches, breaks, etc). Both tables have the common denominator of a unique Schedule ID. How do I bring them together with repetitive Schedule records from the first table. What I get is the following:

ID Code Time Code Time
1 Open 12:00 Break 2:00
1 Open 12:00 Lunch 4:00
1 Open 12:00 Break 6:00

What I want is the following:

ID Code Time Code2 Time Code3 Time Code4 Time
1 Open 12:00 Break 2:00 Lunch 4:00 Break 6:00

Please help,

Rick.

View 3 Replies View Related

Multiple First Records

Jan 11, 2005

Is there away to return just the first record of a bunch of tables? I have stuff that gets updated daily and need to be able to search thru all of it.

View 4 Replies View Related

VBA Across Multiple Records

Mar 28, 2012

I have drafted a simple VBA code in a form button that takes the result calculated in a query and pastes the result into a table. I have attached my test database to illistrate..In my attached database, i have a list of 5 records, i am wanting to push the calculation button have all the records updated with the result that is calculated in the query in 1 go.

As it stands right now i have to do it one at a time per record, which is not preferable when there are potentially hundreds or thousands of lines. I am wanting to do this because i want to reduce my reliance on calculated cells in forms and reports where i have to draft long formulae across 3 separate queries to get the result i am looking for.

View 3 Replies View Related

Multiple Selection Of Records

Dec 17, 2005

I'm building a database for a realtor friend. Part of his job is keeping track of where his clients want to live. I have added a field named "Areas". I need to populate that field with names of cities where his clients want to buy thier house. Sometimes there are only a couple of cities. Other times there could be more then 10. I don't want him to type these cities in. He is not a good typer, either am I, and he is prone to abbreviations and typos. Garbage in garbage out. I would like to provide him a drop down list, or something like that, of all the cities or areas and have him select each area and then either hit a command button or copy/paste it to that text box. Either way will work. The command button would be nifty. The result would give him the option of doing a form filter and being able to filter that text box for ex: "atlanta" and "syracuse". He then could cue these people when he has a property come available in either one of those cities.

I DON'T understand VBA code. I don't know how to write it or where to put it.

I tried to search this site and I could not find any threads like this, to my amazement. If there is a similiar post out there and I could not find it I apologize in advance.

View 1 Replies View Related

Entering Multiple Records

Apr 7, 2008

Heloo all,

I have a table, and a data access page for data entry.... is it possible for me to add a mulltiple records at a time.... please help

View 1 Replies View Related

Delete Multiple Records

May 9, 2007

how do i delete multiple records in a table, for example if i have a table that as serial_num 123 twice, how do i delete the two records, basically i don't want to delete one record, i want to delete the two records. Thanks.

View 5 Replies View Related

Need Help With Adding Multiple Records

Jul 5, 2005

I believe this can be done with a query, but am having problems with it.

What i have is a db with a table for employee another table for training items and a third table to tie them both together. These employees are divided into several "teams" (team 1, team 2 etc ...) The training items are assigned to some or all of the teams. ( i know that this is a many to many relationship and i believe that is where i get confused ) Now the problem. What i would like to do is have a form that will allow the user to assign a new training item to teams 4, 5 and 6 and have access automatically create a record in the table. Now that the 20 or so employees that are assigned these training items will have a record that the user can simply fill in a date when the training has been completed by the employee.

I believe what i am looking for is an append query. Is that right?? Have been playing with this one for awhile and have no luck so i would appreciate any help i can get on this one


thanks again

Ricky

View 5 Replies View Related

How To Delete Multiple Records

Aug 15, 2005

Hi,

I'm trying to delete say 4000 records, out of total 5000 records. I want to keep 1000 records based on the ID.

How can I write the SQL DELETE query, so that only 1000 records remain based on the query?

Thank you in advance for your great help.

regards,
Pranesh
Alberta, Canada

View 1 Replies View Related

Append Multiple Records

Oct 25, 2005

I Have a situation where a client will want to pay some lump sum amounts of money off a loan and it may be something like $100 per month for 10 months. I have created a table for lump sums payments into which this info would be entered but I need to create an individual payment for the period of time designated ie 10 individual records of $100 each starting in a month and incrementing the month.

I see it being a append query but do not know how to make the append query create 10 instances of the one record based on a field value. I also do not know how to make the Month increment by one for each record ie Mar05,Apr05,May05 etc.

If this is possible any suggestions would be appreciated.

View 6 Replies View Related







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