Senin, 28 Januari 2019

Re: [MS_AccessPros] Debug.Print does not work

 

Dear Duane,
May I phone you for just few minutes? Thanks in advance.
Best Regards,
Kevin

--------------------------------------------
On Tue, 1/29/19, Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Subject: Re: [MS_AccessPros] Debug.Print does not work
To: "ms_access_professionals@yahoogroups.com" <ms_access_professionals@yahoogroups.com>
Date: Tuesday, January 29, 2019, 12:10 PM


 















Does the code compile?  Have
you set a break point and stepped through the lines of
code?



Duane




Get Outlook for iOS

 

From:
ms_access_professionals@yahoogroups.com on behalf of
qingqinga@yahoo.com [MS_Access_Professionals]
<ms_access_professionals@yahoogroups.com>

Sent: Monday, January 28, 2019 9:47 PM

To: ms_access_professionals@yahoogroups.com

Subject: [MS_AccessPros] Debug.Print does not work
 

Dear All,

Debug does not work this this code. Please help:



Private Sub Form_BeforeUpdate(Cancel As Integer)



On Error GoTo ErrHandle



Me.RecordDate = Date

Me.TransactionEmployeeID = Forms!frmWelcome!EmployeeID



Dim strSQL As String

Dim strContractCurrency As String

Dim strFinalCurrency As String





Dim strContractTotalAmount As Long '地接合同款

Dim strContractTotalAmountReceived As Long
'地接团款已收

Dim strContractTotalAmountReceivedTXT As String

Dim strContractTotalAmountNotReceived
'地接团款未收

Dim strContractTotalAmountNotReceivedTXT As String

Dim strContractTotalAmountReceivedPercent As Long
'收到百分比

Dim strContractTotalAmountNotReceivedPercent As Long
'未收到百分比



Dim strAirTicketInsuranceVisaTotal As Long '机保签款


Dim strTotalAirVisaInsuranceReceived As Long
'机保签已收

Dim strTotalAirVisaInsuranceReceivedTXT As String

Dim strTotalAirVisaInsuranceNotReceived As Long
'机保签未收

Dim strTotalAirVisaInsuranceNotReceivedTXT As String

Dim strTotalAirVisaInsuranceReceivedPercent As Long
'收到百分比

Dim strTotalAirVisaInsuranceNotReceivedPercent As Long
'未收到百分比



strContractCurrency = ELookup("ContractCurrency",
"tblGroup", "GroupID=" &
Nz(Me.GroupID, 0))


strFinalCurrency = ELookup("FinalCurrency",
"tblGroup", "GroupID=" &
Nz(Me.GroupID, 0))


strContractTotalAmount =
ELookup("ContractTotalAmount",
"tblGroup", "GroupID=" &
Nz(Me.GroupID, 0))


strAirTicketInsuranceVisaTotal =
ELookup("AirTicketInsuranceVisaTotal",
"tblGroup", "GroupID=" &
Nz(Me.GroupID, 0))




strContractTotalAmountReceived =
Nz(DSum("AmountContract",
"qryTransactionTotalCalc", "Checked="
& True & "AND OfficeLocationID=" & 1
& "AND CostTypeID=" & 17 & "AND
GroupID=" & Nz(Me.GroupID, 0)), 0)


strContractTotalAmountReceivedTXT = strContractCurrency
& " " & strContractTotalAmountReceived


strContractTotalAmountNotReceived = strContractTotalAmount -
strContractTotalAmountReceived


strContractTotalAmountNotReceivedTXT = strContractCurrency
& " " & strContractTotalAmountNotReceived


strContractTotalAmountReceivedPercent =
IIf(strContractTotalAmount = 0, "",
strContractTotalAmountReceived / strContractTotalAmount)


strContractTotalAmountNotReceivedPercent =
IIf(strContractTotalAmount = 0, "",
strContractTotalAmountNotReceived / strContractTotalAmount)




strTotalAirVisaInsuranceReceived =
Nz(DSum("AmountFinal",
"qryTransactionTotalCalc", "Checked="
& True & "AND OfficeLocationID=" & 1
& "AND CostTypeID=" & 21 & "AND
GroupID=" & Nz(Me.GroupID, 0)), 0)


strTotalAirVisaInsuranceReceivedTXT = strFinalCurrency &
" " & strTotalAirVisaInsuranceReceived


strTotalAirVisaInsuranceNotReceived =
strAirTicketInsuranceVisaTotal -
strTotalAirVisaInsuranceReceived


strTotalAirVisaInsuranceNotReceivedTXT = strFinalCurrency
& " " &
strTotalAirVisaInsuranceNotReceived


strTotalAirVisaInsuranceReceivedPercent =
IIf(strAirTicketInsuranceVisaTotal = 0, "",
strTotalAirVisaInsuranceReceived /
strAirTicketInsuranceVisaTotal)


strTotalAirVisaInsuranceNotReceivedPercent =
IIf(strAirTicketInsuranceVisaTotal = 0, "",
strTotalAirVisaInsuranceNotReceived /
strAirTicketInsuranceVisaTotal)






strSQL = "UPDATE tblGroup " & _

"SET [ContractTotalAmountReceived] = " &
strContractTotalAmountReceived & ", " & _


"SET [ContractTotalAmountReceivedTXT] = ' "
& strContractTotalAmountReceivedTXT & " ',
" & _


"SET [ContractTotalAmountNotReceived] = " &
strContractTotalAmountNotReceived & ", " &
_


"SET [ContractTotalAmountNotReceivedTXT] = ' "
& strContractTotalAmountNotReceivedTXT & "
', " & _


"SET [ContractTotalAmountReceivedPercent] = "
& strContractTotalAmountReceivedPercent & ",
" & _


"SET [ContractTotalAmountNotReceivedPercent] = "
& strContractTotalAmountNotReceivedPercent & ",
" & _


"SET [TotalAirVisaInsuranceReceived] = " &
strTotalAirVisaInsuranceReceived & ", " &
_


"SET [TotalAirVisaInsuranceReceivedTXT] = ' "
& strTotalAirVisaInsuranceReceivedTXT & "
', " & _


"SET [TotalAirVisaInsuranceNotReceived] = " &
strTotalAirVisaInsuranceNotReceived & ", "
& _


"SET [TotalAirVisaInsuranceNotReceivedTXT] = '
" & strTotalAirVisaInsuranceNotReceivedTXT &
" ', " & _


"SET [TotalAirVisaInsuranceReceivedPercent] = "
& strTotalAirVisaInsuranceReceivedPercent & ",
" & _


"SET [TotalAirVisaInsuranceNotReceivedPercent] = "
& strTotalAirVisaInsuranceNotReceivedPercent & _


" WHERE GroupID = " & Me.GroupID



Debug.Print strSQL

CurrentDb.Execute strSQL, dbFailOnError





ErrExit:

Exit Sub



ErrHandle:

Resume ErrExit



End Sub



Thanks in advance,

Best Regards,

Kevin





------------------------------------

Posted by: <zhao.liqing@yahoo.com>

------------------------------------





------------------------------------



Yahoo Groups Links



http://groups.yahoo.com/group/MS_Access_Professionals/



Individual Email | Traditional



http://groups.yahoo.com/group/MS_Access_Professionals/join


(Yahoo! ID required)



MS_Access_Professionals-digest@yahoogroups.com

MS_Access_Professionals-fullfeatured@yahoogroups.com




MS_Access_Professionals-unsubscribe@yahoogroups.com



https://info.yahoo.com/legal/us/yahoo/utos/terms/
















#yiv2987444454 #yiv2987444454 --
#yiv2987444454ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px
0;padding:0 10px;}

#yiv2987444454 #yiv2987444454ygrp-mkp hr {
border:1px solid #d8d8d8;}

#yiv2987444454 #yiv2987444454ygrp-mkp #yiv2987444454hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}

#yiv2987444454 #yiv2987444454ygrp-mkp #yiv2987444454ads {
margin-bottom:10px;}

#yiv2987444454 #yiv2987444454ygrp-mkp .yiv2987444454ad {
padding:0 0;}

#yiv2987444454 #yiv2987444454ygrp-mkp .yiv2987444454ad p {
margin:0;}

#yiv2987444454 #yiv2987444454ygrp-mkp .yiv2987444454ad a {
color:#0000ff;text-decoration:none;}
#yiv2987444454 #yiv2987444454ygrp-sponsor
#yiv2987444454ygrp-lc {
font-family:Arial;}

#yiv2987444454 #yiv2987444454ygrp-sponsor
#yiv2987444454ygrp-lc #yiv2987444454hd {
margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}

#yiv2987444454 #yiv2987444454ygrp-sponsor
#yiv2987444454ygrp-lc .yiv2987444454ad {
margin-bottom:10px;padding:0 0;}

#yiv2987444454 #yiv2987444454actions {
font-family:Verdana;font-size:11px;padding:10px 0;}

#yiv2987444454 #yiv2987444454activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}

#yiv2987444454 #yiv2987444454activity span {
font-weight:700;}

#yiv2987444454 #yiv2987444454activity span:first-child {
text-transform:uppercase;}

#yiv2987444454 #yiv2987444454activity span a {
color:#5085b6;text-decoration:none;}

#yiv2987444454 #yiv2987444454activity span span {
color:#ff7900;}

#yiv2987444454 #yiv2987444454activity span
.yiv2987444454underline {
text-decoration:underline;}

#yiv2987444454 .yiv2987444454attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}

#yiv2987444454 .yiv2987444454attach div a {
text-decoration:none;}

#yiv2987444454 .yiv2987444454attach img {
border:none;padding-right:5px;}

#yiv2987444454 .yiv2987444454attach label {
display:block;margin-bottom:5px;}

#yiv2987444454 .yiv2987444454attach label a {
text-decoration:none;}

#yiv2987444454 blockquote {
margin:0 0 0 4px;}

#yiv2987444454 .yiv2987444454bold {
font-family:Arial;font-size:13px;font-weight:700;}

#yiv2987444454 .yiv2987444454bold a {
text-decoration:none;}

#yiv2987444454 dd.yiv2987444454last p a {
font-family:Verdana;font-weight:700;}

#yiv2987444454 dd.yiv2987444454last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}

#yiv2987444454 dd.yiv2987444454last p
span.yiv2987444454yshortcuts {
margin-right:0;}

#yiv2987444454 div.yiv2987444454attach-table div div a {
text-decoration:none;}

#yiv2987444454 div.yiv2987444454attach-table {
width:400px;}

#yiv2987444454 div.yiv2987444454file-title a, #yiv2987444454
div.yiv2987444454file-title a:active, #yiv2987444454
div.yiv2987444454file-title a:hover, #yiv2987444454
div.yiv2987444454file-title a:visited {
text-decoration:none;}

#yiv2987444454 div.yiv2987444454photo-title a,
#yiv2987444454 div.yiv2987444454photo-title a:active,
#yiv2987444454 div.yiv2987444454photo-title a:hover,
#yiv2987444454 div.yiv2987444454photo-title a:visited {
text-decoration:none;}

#yiv2987444454 div#yiv2987444454ygrp-mlmsg
#yiv2987444454ygrp-msg p a span.yiv2987444454yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}

#yiv2987444454 .yiv2987444454green {
color:#628c2a;}

#yiv2987444454 .yiv2987444454MsoNormal {
margin:0 0 0 0;}

#yiv2987444454 o {
font-size:0;}

#yiv2987444454 #yiv2987444454photos div {
float:left;width:72px;}

#yiv2987444454 #yiv2987444454photos div div {
border:1px solid
#666666;min-height:62px;overflow:hidden;width:62px;}

#yiv2987444454 #yiv2987444454photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}

#yiv2987444454 #yiv2987444454reco-category {
font-size:77%;}

#yiv2987444454 #yiv2987444454reco-desc {
font-size:77%;}

#yiv2987444454 .yiv2987444454replbq {
margin:4px;}

#yiv2987444454 #yiv2987444454ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}

#yiv2987444454 #yiv2987444454ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean,
sans-serif;}

#yiv2987444454 #yiv2987444454ygrp-mlmsg table {
font-size:inherit;font:100%;}

#yiv2987444454 #yiv2987444454ygrp-mlmsg select,
#yiv2987444454 input, #yiv2987444454 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}

#yiv2987444454 #yiv2987444454ygrp-mlmsg pre, #yiv2987444454
code {
font:115% monospace;}

#yiv2987444454 #yiv2987444454ygrp-mlmsg * {
line-height:1.22em;}

#yiv2987444454 #yiv2987444454ygrp-mlmsg #yiv2987444454logo {
padding-bottom:10px;}


#yiv2987444454 #yiv2987444454ygrp-msg p a {
font-family:Verdana;}

#yiv2987444454 #yiv2987444454ygrp-msg
p#yiv2987444454attach-count span {
color:#1E66AE;font-weight:700;}

#yiv2987444454 #yiv2987444454ygrp-reco
#yiv2987444454reco-head {
color:#ff7900;font-weight:700;}

#yiv2987444454 #yiv2987444454ygrp-reco {
margin-bottom:20px;padding:0px;}

#yiv2987444454 #yiv2987444454ygrp-sponsor #yiv2987444454ov
li a {
font-size:130%;text-decoration:none;}

#yiv2987444454 #yiv2987444454ygrp-sponsor #yiv2987444454ov
li {
font-size:77%;list-style-type:square;padding:6px 0;}

#yiv2987444454 #yiv2987444454ygrp-sponsor #yiv2987444454ov
ul {
margin:0;padding:0 0 0 8px;}

#yiv2987444454 #yiv2987444454ygrp-text {
font-family:Georgia;}

#yiv2987444454 #yiv2987444454ygrp-text p {
margin:0 0 1em 0;}

#yiv2987444454 #yiv2987444454ygrp-text tt {
font-size:120%;}

#yiv2987444454 #yiv2987444454ygrp-vital ul li:last-child {
border-right:none !important;
}
#yiv2987444454

__._,_.___

Posted by: <zhao.liqing@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


SPONSORED LINKS
.

__,_._,___

Tidak ada komentar:

Posting Komentar