473,795 Members | 3,063 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Copy Same records

Roy
Hello,
Sorry for a lengthy post.
I develop a access 2000 application.As a part of the daily download,I
import data from a excel sheet into a access table.
The data is as follows:

Task Comments
11801 08/02/2004 07:15:43 CET: Submitted
08/02/2004 06:35:39 CET: Please provide Post Mortem
11804 08/18/2004 09:33:46 CET: Sent mail to Carey Walker chasing
the Post Mortem
08/05/2004 11:18:30 CET: Reassigned to Carey to complete
the post mortem
08/03/2004 14:42:46 CET: Reassigned to John to complete
the PM>
08/02/2004 08:40:52 CET: All Severity 1 problems must
have a post mortem produced and distributed within 24
hours. It is the responsibility of the person producing
the post mortem to send the completed post mortem out to
*GT EU Post Mortems
11805 08/02/2004 09:48:48 CET: Post Mortem completed
08/02/2004 08:49:04 CET: All Severity 1 problems must have
a post mortem produced and distributed within 24 hours. It
is the responsibility of the person producing the post
mortem to send
11815 08/03/2004 03:57:59 CET: All details provided to EDC. EDC
to investigate further.
08/13/2004 13:00:59 CET: All details provided to EDC. EDC
to investigate further.

I want to construct a table duplicating the task number for the
different comments associated with a task number.How to do this in a
query or a module,because this will be a part of a daily routine?
Currently,I am doing this copy and paste manually since the volume is
low but which is expected to go five fold soon.

Thanks,

Roy

Nov 13 '05 #1
3 1681
Roy
Repost!!!
Any workaround or solution to this????

Nov 13 '05 #2
Roy wrote:
Hello,
Sorry for a lengthy post.
I develop a access 2000 application.As a part of the daily download,I
import data from a excel sheet into a access table.
The data is as follows:

Task Comments
11801 08/02/2004 07:15:43 CET: Submitted
08/02/2004 06:35:39 CET: Please provide Post Mortem
11804 08/18/2004 09:33:46 CET: Sent mail to Carey Walker chasing
...
I want to construct a table duplicating the task number for the
different comments associated with a task number.How to do this in a
query or a module,because this will be a part of a daily routine?
Currently,I am doing this copy and paste manually since the volume is
low but which is expected to go five fold soon.

Thanks,

Roy


I couldn't understand your question so I'll just write something :-).

I have a main form with a subform containing line items in datasheet
view. The subform contains a combobox with some common things that
people can choose. In addition to the selections from the combobox
there is a set of standard notes that can be selected. The standard
notes have to be marked with a standard note identifier (not shown) and
must be selected from a list of literal industry standard descriptions.
tblStandardNote s is a local table.

tblStandardNote s
NoteID Auto
PreClickThisNot e Y/N
Include Y/N
StandardNote Text

qryStandardNote s
SELECT Include, StandardNote FROM tblStandardNote s

frmSubStandardN otes
RecordSource: qryStandardNote s

frmSubLineItems
RecordSource: SELECT Remarks FROM tblLineItemsLoc al ORDER BY
LineItemID;

When the user clicks the option button for general notes, the standard
remarks are shown (in datasheet view also) with some Include boxes
checked. The user can check or uncheck the Include box in the subform.
When they are done selecting standard notes they click the option
button for line items. They can then choose to append all the standard
notes they selected as line items.

'Begin Code behind form-------------------
Private Sub optStandardNote s_Click()
Dim strSQL As String
Dim lngHold As Long

optLineItems.Va lue = 0
optStandardNote s.Value = -1
'First, set the prechecked items
strSQL = "UPDATE tblStandardNote s SET tblStandardNote s.Include =
[tblStandardNote s].[PreClickThisNot e];"
DoCmd.SetWarnin gs False
DoCmd.RunSQL strSQL
DoCmd.SetWarnin gs True
'Wait a moment
For lngHold = 1 To 1000
DoEvents
Next lngHold
'Now, swap subforms
SubformMain.Sou rceObject = "frmSubStandard Notes"
End Sub

Private Sub optLineItems_Cl ick()
Dim Response As Variant
Dim strTitle As String
Dim strMessage As String
Dim MyDB As Database
Dim NoteRS As Recordset
Dim strSQL As String
Dim lngI As Long
Dim lngCount As Long

optLineItems.Va lue = -1
optStandardNote s.Value = 0
strTitle = "Action Confirmation"
strMessage = "Click OK to append the selected notes."
Response = MsgBox(strMessa ge, vbOKCancel, strTitle)
If Response = vbOK Then
'Add the selected notes
Set MyDB = CurrentDb
strSQL = "SELECT * FROM tblStandardNote s WHERE [Include] = -1"
Set NoteRS = MyDB.OpenRecord set(strSQL, dbOpenSnapshot)
strSQL = "SELECT * FROM tblLineItemsLoc al"
Set MyRS = MyDB.OpenRecord set(strSQL, dbOpenDynaset)
If NoteRS.RecordCo unt > 0 Then
NoteRS.MoveLast
lngCount = NoteRS.RecordCo unt
NoteRS.MoveFirs t
For lngI = 1 To lngCount
MyRS.AddNew
MyRS("Remarks") = NoteRS("Standar dNote")
MyRS.Update
If lngI <> lngCount Then NoteRS.MoveNext
Next lngI
End If
NoteRS.Close
Set NoteRS = Nothing
Set MyDB = Nothing
End If
'Now, swap subforms
SubformMain.Sou rceObject = "frmSubLineItem s"
End Sub
'End Code behind form-------------------

I realize that it would have easier to use an Append Query in
optLineItems_Cl ick() but this code is old, it wasn't intended to be
seen by anyone else and I haven't gotten around to changing it yet.
Perhaps you are trying to create a table of distinct tasknumber,
comment pairs that grow daily yet without adding duplicates. Maybe
these ramblings will help you clarify what you are trying to do.

James A. Fortune

Nov 13 '05 #3
rkc
Roy wrote:
I develop a access 2000 application.As a part of the daily download,I
import data from a excel sheet into a access table.
The data is as follows:

Task Comments
11801 08/02/2004 07:15:43 CET: Submitted
08/02/2004 06:35:39 CET: Please provide Post Mortem
11804 08/18/2004 09:33:46 CET: Sent mail to Carey Walker chasing
the Post Mortem
08/05/2004 11:18:30 CET: Reassigned to Carey to complete
the post mortem
08/03/2004 14:42:46 CET: Reassigned to John to complete
the PM>
08/02/2004 08:40:52 CET: All Severity 1 problems must
have a post mortem produced and distributed within 24
hours. It is the responsibility of the person producing
the post mortem to send the completed post mortem out to
*GT EU Post Mortems
11805 08/02/2004 09:48:48 CET: Post Mortem completed
08/02/2004 08:49:04 CET: All Severity 1 problems must have
a post mortem produced and distributed within 24 hours. It
is the responsibility of the person producing the post
mortem to send
11815 08/03/2004 03:57:59 CET: All details provided to EDC. EDC
to investigate further.
08/13/2004 13:00:59 CET: All details provided to EDC. EDC
to investigate further.


There's no way to tell from your post how the sheet is actually
formatted. Are the comments for each task all in one cell or
multiple cells?

I you can't import the data via File, Get External Data,
code could certaily be written to import it via automation.
Couldn't say how without actually seeing it.


Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
10931
by: news.hp.com | last post by:
I have situation where I need to copy multiple records (only certain fields) from a Rules table to an Events table based on a selection identified in a combo box. When the selection is made in a parent table, multiple records in a child table are affected. However, I'm a bit weak on programming experience. INSERT INTO is not suitable. Any ideas? When the combo box update property is triggered, the code needs to accomplish: IF...
3
8372
by: Tlm | last post by:
Hello All, I have a form (FrmA) with a subform (SubFrmB) embedded in it. SubFrmB also has a subform embedded in it (SubFrmC) The form's recordsource is based on a table (TblA). SubFrmB's recordsource is also based on a table (TblB). SubFrmC's recordsource is also based on a table (TblC). There is a one-to-many relationship between TblA (one) and TblB (many).
1
2569
by: Sean Howard | last post by:
Dear All, As is my want I need to do something in Access that seems simple but cannot fathom out. I have main form with two subforms, both datasheets with an almost identical table structure. I want to add the functionality to copy records from subformA to subformB WITHOUT USING COPY/PASTE. The reasonfor this is that I must
2
1847
by: HB2 | last post by:
I use to be able to highlight several records in a table, copy them and paste new records. Now when I right click the records the copy and paste functions are disabled. How do I enable them? Thanks
19
3480
by: davidgordon | last post by:
Hi, I need some pointers/help on how to do the following if it possible: In my access db, I have the following: Tables: Products, Sub-Assembly, Product-Pack Table, Products
5
1909
by: DraguVaso | last post by:
Hi, I need a SECURE way to copy parts of a file. I'm having files which contains a whole bunch of records. In one 'fysical' file I'm having one or more logical files. What I need to do is to copy a logical file (a part of the fysical file) into a new file. But the 'big' problem is: these records contains bankstatements, so I can't take the risk that there would be a record missing, or even one little charachter. The copy I make has to...
0
2153
by: igendreau | last post by:
I have a database with a Header table. Each record in tblHeader has two One-to-Many Relationships: with tblLines and tblKeys. The HeaderID field ties tblHeader to the other two tables. The data collected in tblHeader is simple: HeaderID (unique), a text description field, and a date field. I need to be able to copy header and it's related info. I have a form with a "Copy Source" combo box allowing the user to select a Header...
5
13996
by: Kaur | last post by:
Hi, I have been successful copying a vba code from one of your posts on how to copy and paste a record by declaring the desired fields that needs to be copied in form's declaration and creating two button "copy" and "paste". Works like magic. My problem is how can I copy multiple records and paste them at the same time. My data entry form has main form that has a Questionlist box of Questions. The second list box on the same form displays...
2
3469
by: Swinky | last post by:
I hope someone can help...I feel like I'm walking in the dark without a flashlight (I'm NOT a programmer but have been called to task to do some work in Access that is above my head). I have code that will successfully copy a record and append the information to a new record in the same table (parent table) within a form. However, there are related child tables with primary keys (set to Autonumber) stored in sub-forms. That information...
5
11155
by: phill86 | last post by:
Hi I have a main form that holds records for scheduled meetings, date time location etc... in that form i have a sub form that has a list of equipment resources that you can assign to the meeting in the main form. I have two buttons in the sub form one for selecting and copying all the records and another for pasting the records this enables me to copy and paste the equipment resources from one scheduled meeting to another. The buttons are...
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10436
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10213
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3722
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.