G
ges via AccessMonster.com
Hi,
I have upsizing access to sql server. I have three big tables that's heavily
updated daily by users. I have upsized these 3 tables to sql server 2005.
(I'm using Access 2003).
I'm using a form call "CollectorDashboard" to update these 3 tables. User
will type in values in the text boxes and click "update button". Below is my
code for "update button"
Private Sub cmdbtnUpdate_Click()
On Error GoTo Err_cmdbtnUpdate_Click
Dim Errorno As String
Dim errormsg As String
Dim strSQL As String
strSQL = "UPDATE (tblAccounts INNER JOIN tblCollectorNotes "
strSQL = strSQL & "ON tblAccounts.AcctIDAuto=tblCollectorNotes.
AcctIDAuto) "
strSQL = strSQL & "INNER JOIN tblCollectionsInfo ON tblAccounts.
AcctIDAuto=tblCollectionsInfo.AcctIDAuto "
strSQL = strSQL & "SET tblCollectorNotes.CN_MPELastPaidInfo_ArborSent =
" & """" & txtLastPaidDate & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_LastPaidAmount = " & """" &
txtLastPaidAmount & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_PersonContacted = " & """" &
txtContactPerson & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_ContactPhone = " & """" &
txtContactPhone & """" & ", "
strSQL = strSQL & "tblAccounts.a_BillCycle = " & """" & txtBillCycle &
"""" & ", "
strSQL = strSQL & "tblAccounts.Agent = " & """" & txtAgent & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_Letter1 = " & """" & txtLetter1
& """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_Letter2 = " & """" & txtLetter2
& """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_OutbCall1 = " & """" &
txtOutbCall1 & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_OutbCall2 = " & """" &
txtOutbCall2 & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_OutbCall3 = " & """" &
txtOutbCall3 & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_InbCall1 = " & """" &
txtInbCall1 & """" & ", "
strSQL = strSQL & "tblCollectorNotes.[CN_InbCall2] = " & """" &
txtInbCall2 & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_SoftDisc = " & """" &
txtSoftDisco & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_HardDisc = " & """" &
txtHardDisco & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_PromiseToPay = " & """" &
txtPromiseToPay & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_PaymentArrangement = " & """" &
cboPaymentArrangement & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_LastAction = " & """" &
cboLastAction.Column(0) & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_NextFlwUp = " & """" &
txtFollowUp & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_ManagersComment = " & """" &
txtManagerComment & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_Notes = " & """" & txtNotes &
"""" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_UpdateDate = " & """" & txtDate
& """" & " "
strSQL = strSQL & "WHERE (((tblAccounts.a_FileType)= " & """" &
lboCollectionsInfo.Column(1) & """" & ") "
strSQL = strSQL & "AND ((tblAccounts.a_Account)=" & """" & txtAccount &
"""" & "));"
CurrentDb.Execute strSQL
Before I upsize the table to sql server, the above procedure work fine. But
not after upsizing.
I got below error code:
"Error 3073" operation must use an updateable query"
Can any one please help me. I'm NEW to sql 2005. Just don't know how it
work.
Thank you in advance for any input.
Ges
I have upsizing access to sql server. I have three big tables that's heavily
updated daily by users. I have upsized these 3 tables to sql server 2005.
(I'm using Access 2003).
I'm using a form call "CollectorDashboard" to update these 3 tables. User
will type in values in the text boxes and click "update button". Below is my
code for "update button"
Private Sub cmdbtnUpdate_Click()
On Error GoTo Err_cmdbtnUpdate_Click
Dim Errorno As String
Dim errormsg As String
Dim strSQL As String
strSQL = "UPDATE (tblAccounts INNER JOIN tblCollectorNotes "
strSQL = strSQL & "ON tblAccounts.AcctIDAuto=tblCollectorNotes.
AcctIDAuto) "
strSQL = strSQL & "INNER JOIN tblCollectionsInfo ON tblAccounts.
AcctIDAuto=tblCollectionsInfo.AcctIDAuto "
strSQL = strSQL & "SET tblCollectorNotes.CN_MPELastPaidInfo_ArborSent =
" & """" & txtLastPaidDate & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_LastPaidAmount = " & """" &
txtLastPaidAmount & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_PersonContacted = " & """" &
txtContactPerson & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_ContactPhone = " & """" &
txtContactPhone & """" & ", "
strSQL = strSQL & "tblAccounts.a_BillCycle = " & """" & txtBillCycle &
"""" & ", "
strSQL = strSQL & "tblAccounts.Agent = " & """" & txtAgent & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_Letter1 = " & """" & txtLetter1
& """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_Letter2 = " & """" & txtLetter2
& """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_OutbCall1 = " & """" &
txtOutbCall1 & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_OutbCall2 = " & """" &
txtOutbCall2 & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_OutbCall3 = " & """" &
txtOutbCall3 & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_InbCall1 = " & """" &
txtInbCall1 & """" & ", "
strSQL = strSQL & "tblCollectorNotes.[CN_InbCall2] = " & """" &
txtInbCall2 & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_SoftDisc = " & """" &
txtSoftDisco & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_HardDisc = " & """" &
txtHardDisco & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_PromiseToPay = " & """" &
txtPromiseToPay & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_PaymentArrangement = " & """" &
cboPaymentArrangement & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_LastAction = " & """" &
cboLastAction.Column(0) & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_NextFlwUp = " & """" &
txtFollowUp & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_ManagersComment = " & """" &
txtManagerComment & """" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_Notes = " & """" & txtNotes &
"""" & ", "
strSQL = strSQL & "tblCollectorNotes.CN_UpdateDate = " & """" & txtDate
& """" & " "
strSQL = strSQL & "WHERE (((tblAccounts.a_FileType)= " & """" &
lboCollectionsInfo.Column(1) & """" & ") "
strSQL = strSQL & "AND ((tblAccounts.a_Account)=" & """" & txtAccount &
"""" & "));"
CurrentDb.Execute strSQL
Before I upsize the table to sql server, the above procedure work fine. But
not after upsizing.
I got below error code:
"Error 3073" operation must use an updateable query"
Can any one please help me. I'm NEW to sql 2005. Just don't know how it
work.
Thank you in advance for any input.
Ges