Please help with this code. I am unable to figure out what's wrong with it.
The purpose of this code is to copy data from one record into an infinite amount of records. For example if there were 5 department records (from different departments) linked by a common identifier (worksheet#). The (worksheet#) and I wanted to enter information in one record and have that data copied into the remaining 4.
Thanks in Advance for your help!
Regards,
DR
Here is code: - Private Sub CmdCopyPaste_Click()
-
-
Dim iResponce As Integer
-
-
iResponce = MsgBox("Are you sure you want to copy THESE results to ALL departments on THIS worksheet? ", vbYesNo, "COPY Results")
-
-
If iResponce = vbYes Then ' They Clicked YES
-
-
-
-
Dim vInterviewee
-
-
Dim vInterviewDate As String
-
-
Dim vExpWContent
-
-
Dim vExpWSystems
-
-
Dim vMaxOffFloor
-
-
Dim vImpactedProjects
-
-
Dim vLocation
-
-
Dim vGoodTimes
-
-
Dim vBadTimes
-
-
Dim vAccessibilityIssues
-
-
Dim vAccessibilityDesc
-
-
Dim vConcurrentTraining
-
-
Dim vConTrainDetail
-
-
Dim vSpecialNeeds
-
-
Dim vSpecNeedDetail
-
-
Dim vProcessChange
-
-
Dim vBusProcessContact
-
-
Dim vProcessEPOContact
-
-
Dim vProcessDetail
-
-
Dim vNotes
-
-
Dim vID
-
-
-
-
Dim strSQL
-
-
-
-
Me.Dirty = False ' save current record
-
-
-
-
vInterviewee = Me.Interviewee
-
-
vProjectImpact = Me.ProjectImpact
-
-
vExpWContent = Me.ExpWContent
-
-
vExpWSystems = Me.ExpWSystems
-
-
vMaxOffFloor = Me.MaxOffFloor
-
-
vImpactedProjects = Me.ImpactedProjects
-
-
vLocation = Me.Location
-
-
vGoodTimes = Me.GoodTimes
-
-
vBadTimes = Me.BadTimes
-
-
vAccessibilityIssues = Me.AccessibilityIssues
-
-
vAccessibilityDesc = Me.AccessibilityDesc
-
-
vConcurrentTraining = Me.ConcurrentTraining
-
-
vConTrainDetail = Me.ConTrainDetail
-
-
vSpecialNeeds = Me.SpecialNeeds
-
-
vSpecNeedDetail = Me.SpecNeedDetail
-
-
vProcessChange = Me.ProcessChange
-
-
vBusProcessContact = Me.BusProcessContact
-
-
vProcessEPOContact = Me.ProcessEPOContact
-
-
vProcessDetail = Me.ProcessDetail
-
-
vNotes = Me.Notes
-
-
vID = Me.ID
-
-
-
If IsNull(InterviewDate) Then
-
-
vInterviewDate = "NULL"
-
-
Else
-
-
vInterviewDate = "#" & CStr(InterviewDate) & "#"
-
-
End If
-
-
strSQL = "Update tblAAResults set Interviewee = '" & vInterviewee & _
-
-
"', InterviewDate = " & vInterviewDate & " " & " , ProjectImpact = '" & vProjectImpact & "' , ExpWContent = '" & vExpWContent & _
-
-
"' , ExpWSystems = '" & ExpWSystems & "', MaxOffFloor = '" & vMaxOffFloor & _
-
-
"', ImpactedProjects = '" & vImpactedProjects & "', Location = '" & vLocation & _
-
-
"', GoodTimes = '" & vGoodTimes & "', BadTimes = '" & vBadTimes & _
-
-
"' , AccessibilityIssues = '" & vAccessibilityIssues & "' , AccessibilityDesc = '" & vAccessibilityDesc & _
-
-
"' , ConcurrentTraining = '" & vConcurrentTraining & "', ConTrainDetail = '" & vConTrainDetail & _
-
-
"', SpecialNeeds = '" & vSpecialNeeds & "', SpecNeedDetail = '" & vSpecNeedDetail & _
-
-
"' , ProcessChange = '" & vProcessChange & "', BusProcessContact = '" & vBusProcessContact & _
-
-
"', ProcessEPOContact = '" & vProcessEPOContact & " ', ProcessDetail = '" & vProcessDetail & _
-
-
"', ID = '" & vID & "', Notes = '" & vNotes & "' where AAID = " & Me.AAID & " and Department <> ' " & Me.Department & "'"
-
MsgBox strSQL
-
Debug.Print strSQL
-
CurrentDb.Execute strSQL, dbFailOnError
-
-
Else
-
End If
-
End Sub
2 1529
Why not just link the tables using a query if they have the same common key? That way you can keep the information in one location and still use it for reporting.
NeoPa 32,556
Expert Mod 16PB
Daniell,
This is too much like a "Please do my job for me" request.
That is not what this forum is about. We answer technical questions when we can and may guide and assist in some small measure while we do so. We are not a free resource to do your job for you.
If you want help on this then you must form this into some sort of question after doing as much as you can to determine your problem for yourself. You would also need to pass on (explain) what you understood of the problem.
MODERATOR.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Nasir Wasim |
last post by:
How can Access DIV Properties in Script while using Netscape 7.2.
I want to use the div id with it's Visibility and left propertyin
script but it's not working :-(
Main File :
-----------
...
|
by: ASP.Confused |
last post by:
I have an ASP.NET page writtein in VB that uses ADODB. I just had to
force-install MDAC 2.8 after I tried to rollback to 2.6 (my web host uses
this, and I wanted to be compatible with them.) I...
|
by: ASP.Confused |
last post by:
The old message looked a little stale, so I am re-posting it here. Anybody
have any ideas of what I could do?!? The previous responses to this
question are below. If you want to look at the...
|
by: Martin |
last post by:
Hi,
I am getting an "Access Denied" error when attempting to browse asp.net
pages.
I have installed ASP.NET 1.1.4322 on a domain controller.
The machine also has ASP.NET 1.0.3705 installed on...
|
by: Charles Wilson |
last post by:
Can someone point me to some good instructions on using the
WinInet.dll functions from VBA?
I need to interact with a MySQL database via HTTP strings.
We already have the database set up and a...
|
by: markus.rietzler |
last post by:
i want to do (multiple) file upload(s) and display a progress bar.
with firefox and safari it is no problem at all. only IE makes some
problems.
my script is based on ajax-uploader, which can be...
|
by: ravindrakale007 |
last post by:
Hello everyone
i have a problem with my db connection i paste code below please check anyone where i am wrong its very urgent please any one help me!!!!!
and i am working offline using local iis...
|
by: bandkindy |
last post by:
To preface, I am pretty green on the whole sql thing, but am learning quickly so please bear with me.
I have an excel file that is copied to 5 users directories so they have their own working...
|
by: bandkindy |
last post by:
To preface, I am pretty green on the whole sql thing, but am learning quickly so please bear with me.
I have an excel file that is copied to 5 users directories so they have their own working...
|
by: p byers |
last post by:
Good Morning Folks
I have a LAN
Among the several connections to it are the following four devices:
A MAXSTOR network Storage Device
A PC running Microsoft Windows 2000 Server 5.0.2195 (SP4)
A...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
| |