Dear Duane,
I am going to remove the error handling. I'll let you know later. Thanks.
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:31 PM
Also remove your error handling that does nothing to help
you find problems..
From:
MS_Access_Professionals@yahoogroups.com
<MS_Access_Professionals@yahoogroups.com> on behalf of
qingqinga@yahoo.com [MS_Access_Professionals]
<MS_Access_Professionals@yahoogroups.com>
Sent: Monday, January 28, 2019 10:27 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Debug.Print does not
work
Dear
Duane,
After running the code, debug.print didn't print
anything. And I don't know how to set a break point.
Please help.
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/
#yiv1931897865 #yiv1931897865 --
#yiv1931897865ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px
0;padding:0 10px;}
#yiv1931897865 #yiv1931897865ygrp-mkp hr {
border:1px solid #d8d8d8;}
#yiv1931897865 #yiv1931897865ygrp-mkp #yiv1931897865hd
{
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}
#yiv1931897865 #yiv1931897865ygrp-mkp #yiv1931897865ads
{
margin-bottom:10px;}
#yiv1931897865 #yiv1931897865ygrp-mkp .yiv1931897865ad
{
padding:0 0;}
#yiv1931897865 #yiv1931897865ygrp-mkp .yiv1931897865ad p
{
margin:0;}
#yiv1931897865 #yiv1931897865ygrp-mkp .yiv1931897865ad a
{
color:#0000ff;text-decoration:none;}
#yiv1931897865 #yiv1931897865ygrp-sponsor
#yiv1931897865ygrp-lc {
font-family:Arial;}
#yiv1931897865 #yiv1931897865ygrp-sponsor
#yiv1931897865ygrp-lc #yiv1931897865hd {
margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}
#yiv1931897865 #yiv1931897865ygrp-sponsor
#yiv1931897865ygrp-lc .yiv1931897865ad {
margin-bottom:10px;padding:0 0;}
#yiv1931897865 #yiv1931897865actions {
font-family:Verdana;font-size:11px;padding:10px 0;}
#yiv1931897865 #yiv1931897865activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}
#yiv1931897865 #yiv1931897865activity span {
font-weight:700;}
#yiv1931897865 #yiv1931897865activity span:first-child
{
text-transform:uppercase;}
#yiv1931897865 #yiv1931897865activity span a {
color:#5085b6;text-decoration:none;}
#yiv1931897865 #yiv1931897865activity span span {
color:#ff7900;}
#yiv1931897865 #yiv1931897865activity span
.yiv1931897865underline {
text-decoration:underline;}
#yiv1931897865 .yiv1931897865attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}
#yiv1931897865 .yiv1931897865attach div a {
text-decoration:none;}
#yiv1931897865 .yiv1931897865attach img {
border:none;padding-right:5px;}
#yiv1931897865 .yiv1931897865attach label {
display:block;margin-bottom:5px;}
#yiv1931897865 .yiv1931897865attach label a {
text-decoration:none;}
#yiv1931897865 blockquote {
margin:0 0 0 4px;}
#yiv1931897865 .yiv1931897865bold {
font-family:Arial;font-size:13px;font-weight:700;}
#yiv1931897865 .yiv1931897865bold a {
text-decoration:none;}
#yiv1931897865 dd.yiv1931897865last p a {
font-family:Verdana;font-weight:700;}
#yiv1931897865 dd.yiv1931897865last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}
#yiv1931897865 dd.yiv1931897865last p
span.yiv1931897865yshortcuts {
margin-right:0;}
#yiv1931897865 div.yiv1931897865attach-table div div a
{
text-decoration:none;}
#yiv1931897865 div.yiv1931897865attach-table {
width:400px;}
#yiv1931897865 div.yiv1931897865file-title a,
#yiv1931897865
div.yiv1931897865file-title a:active, #yiv1931897865
div.yiv1931897865file-title a:hover, #yiv1931897865
div.yiv1931897865file-title a:visited {
text-decoration:none;}
#yiv1931897865 div.yiv1931897865photo-title a,
#yiv1931897865 div.yiv1931897865photo-title a:active,
#yiv1931897865 div.yiv1931897865photo-title a:hover,
#yiv1931897865 div.yiv1931897865photo-title a:visited {
text-decoration:none;}
#yiv1931897865 div#yiv1931897865ygrp-mlmsg
#yiv1931897865ygrp-msg p a span.yiv1931897865yshortcuts
{
font-family:Verdana;font-size:10px;font-weight:normal;}
#yiv1931897865 .yiv1931897865green {
color:#628c2a;}
#yiv1931897865 .yiv1931897865MsoNormal {
margin:0 0 0 0;}
#yiv1931897865 o {
font-size:0;}
#yiv1931897865 #yiv1931897865photos div {
float:left;width:72px;}
#yiv1931897865 #yiv1931897865photos div div {
border:1px solid
#666666;min-height:62px;overflow:hidden;width:62px;}
#yiv1931897865 #yiv1931897865photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}
#yiv1931897865 #yiv1931897865reco-category {
font-size:77%;}
#yiv1931897865 #yiv1931897865reco-desc {
font-size:77%;}
#yiv1931897865 .yiv1931897865replbq {
margin:4px;}
#yiv1931897865 #yiv1931897865ygrp-actbar div a:first-child
{
margin-right:2px;padding-right:5px;}
#yiv1931897865 #yiv1931897865ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean,
sans-serif;}
#yiv1931897865 #yiv1931897865ygrp-mlmsg table {
font-size:inherit;font:100%;}
#yiv1931897865 #yiv1931897865ygrp-mlmsg select,
#yiv1931897865 input, #yiv1931897865 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}
#yiv1931897865 #yiv1931897865ygrp-mlmsg pre,
#yiv1931897865
code {
font:115% monospace;}
#yiv1931897865 #yiv1931897865ygrp-mlmsg * {
line-height:1.22em;}
#yiv1931897865 #yiv1931897865ygrp-mlmsg #yiv1931897865logo
{
padding-bottom:10px;}
#yiv1931897865 #yiv1931897865ygrp-msg p a {
font-family:Verdana;}
#yiv1931897865 #yiv1931897865ygrp-msg
p#yiv1931897865attach-count span {
color:#1E66AE;font-weight:700;}
#yiv1931897865 #yiv1931897865ygrp-reco
#yiv1931897865reco-head {
color:#ff7900;font-weight:700;}
#yiv1931897865 #yiv1931897865ygrp-reco {
margin-bottom:20px;padding:0px;}
#yiv1931897865 #yiv1931897865ygrp-sponsor
#yiv1931897865ov
li a {
font-size:130%;text-decoration:none;}
#yiv1931897865 #yiv1931897865ygrp-sponsor
#yiv1931897865ov
li {
font-size:77%;list-style-type:square;padding:6px 0;}
#yiv1931897865 #yiv1931897865ygrp-sponsor
#yiv1931897865ov
ul {
margin:0;padding:0 0 0 8px;}
#yiv1931897865 #yiv1931897865ygrp-text {
font-family:Georgia;}
#yiv1931897865 #yiv1931897865ygrp-text p {
margin:0 0 1em 0;}
#yiv1931897865 #yiv1931897865ygrp-text tt {
font-size:120%;}
#yiv1931897865 #yiv1931897865ygrp-vital ul li:last-child
{
border-right:none !important;
}
#yiv1931897865
------------------------------------
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/
#yiv8481737338 #yiv8481737338 --
#yiv8481737338ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px
0;padding:0 10px;}
#yiv8481737338 #yiv8481737338ygrp-mkp hr {
border:1px solid #d8d8d8;}
#yiv8481737338 #yiv8481737338ygrp-mkp #yiv8481737338hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}
#yiv8481737338 #yiv8481737338ygrp-mkp #yiv8481737338ads {
margin-bottom:10px;}
#yiv8481737338 #yiv8481737338ygrp-mkp .yiv8481737338ad {
padding:0 0;}
#yiv8481737338 #yiv8481737338ygrp-mkp .yiv8481737338ad p {
margin:0;}
#yiv8481737338 #yiv8481737338ygrp-mkp .yiv8481737338ad a {
color:#0000ff;text-decoration:none;}
#yiv8481737338 #yiv8481737338ygrp-sponsor
#yiv8481737338ygrp-lc {
font-family:Arial;}
#yiv8481737338 #yiv8481737338ygrp-sponsor
#yiv8481737338ygrp-lc #yiv8481737338hd {
margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}
#yiv8481737338 #yiv8481737338ygrp-sponsor
#yiv8481737338ygrp-lc .yiv8481737338ad {
margin-bottom:10px;padding:0 0;}
#yiv8481737338 #yiv8481737338actions {
font-family:Verdana;font-size:11px;padding:10px 0;}
#yiv8481737338 #yiv8481737338activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}
#yiv8481737338 #yiv8481737338activity span {
font-weight:700;}
#yiv8481737338 #yiv8481737338activity span:first-child {
text-transform:uppercase;}
#yiv8481737338 #yiv8481737338activity span a {
color:#5085b6;text-decoration:none;}
#yiv8481737338 #yiv8481737338activity span span {
color:#ff7900;}
#yiv8481737338 #yiv8481737338activity span
.yiv8481737338underline {
text-decoration:underline;}
#yiv8481737338 .yiv8481737338attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}
#yiv8481737338 .yiv8481737338attach div a {
text-decoration:none;}
#yiv8481737338 .yiv8481737338attach img {
border:none;padding-right:5px;}
#yiv8481737338 .yiv8481737338attach label {
display:block;margin-bottom:5px;}
#yiv8481737338 .yiv8481737338attach label a {
text-decoration:none;}
#yiv8481737338 blockquote {
margin:0 0 0 4px;}
#yiv8481737338 .yiv8481737338bold {
font-family:Arial;font-size:13px;font-weight:700;}
#yiv8481737338 .yiv8481737338bold a {
text-decoration:none;}
#yiv8481737338 dd.yiv8481737338last p a {
font-family:Verdana;font-weight:700;}
#yiv8481737338 dd.yiv8481737338last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}
#yiv8481737338 dd.yiv8481737338last p
span.yiv8481737338yshortcuts {
margin-right:0;}
#yiv8481737338 div.yiv8481737338attach-table div div a {
text-decoration:none;}
#yiv8481737338 div.yiv8481737338attach-table {
width:400px;}
#yiv8481737338 div.yiv8481737338file-title a, #yiv8481737338
div.yiv8481737338file-title a:active, #yiv8481737338
div.yiv8481737338file-title a:hover, #yiv8481737338
div.yiv8481737338file-title a:visited {
text-decoration:none;}
#yiv8481737338 div.yiv8481737338photo-title a,
#yiv8481737338 div.yiv8481737338photo-title a:active,
#yiv8481737338 div.yiv8481737338photo-title a:hover,
#yiv8481737338 div.yiv8481737338photo-title a:visited {
text-decoration:none;}
#yiv8481737338 div#yiv8481737338ygrp-mlmsg
#yiv8481737338ygrp-msg p a span.yiv8481737338yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}
#yiv8481737338 .yiv8481737338green {
color:#628c2a;}
#yiv8481737338 .yiv8481737338MsoNormal {
margin:0 0 0 0;}
#yiv8481737338 o {
font-size:0;}
#yiv8481737338 #yiv8481737338photos div {
float:left;width:72px;}
#yiv8481737338 #yiv8481737338photos div div {
border:1px solid
#666666;min-height:62px;overflow:hidden;width:62px;}
#yiv8481737338 #yiv8481737338photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}
#yiv8481737338 #yiv8481737338reco-category {
font-size:77%;}
#yiv8481737338 #yiv8481737338reco-desc {
font-size:77%;}
#yiv8481737338 .yiv8481737338replbq {
margin:4px;}
#yiv8481737338 #yiv8481737338ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}
#yiv8481737338 #yiv8481737338ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean,
sans-serif;}
#yiv8481737338 #yiv8481737338ygrp-mlmsg table {
font-size:inherit;font:100%;}
#yiv8481737338 #yiv8481737338ygrp-mlmsg select,
#yiv8481737338 input, #yiv8481737338 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}
#yiv8481737338 #yiv8481737338ygrp-mlmsg pre, #yiv8481737338
code {
font:115% monospace;}
#yiv8481737338 #yiv8481737338ygrp-mlmsg * {
line-height:1.22em;}
#yiv8481737338 #yiv8481737338ygrp-mlmsg #yiv8481737338logo {
padding-bottom:10px;}
#yiv8481737338 #yiv8481737338ygrp-msg p a {
font-family:Verdana;}
#yiv8481737338 #yiv8481737338ygrp-msg
p#yiv8481737338attach-count span {
color:#1E66AE;font-weight:700;}
#yiv8481737338 #yiv8481737338ygrp-reco
#yiv8481737338reco-head {
color:#ff7900;font-weight:700;}
#yiv8481737338 #yiv8481737338ygrp-reco {
margin-bottom:20px;padding:0px;}
#yiv8481737338 #yiv8481737338ygrp-sponsor #yiv8481737338ov
li a {
font-size:130%;text-decoration:none;}
#yiv8481737338 #yiv8481737338ygrp-sponsor #yiv8481737338ov
li {
font-size:77%;list-style-type:square;padding:6px 0;}
#yiv8481737338 #yiv8481737338ygrp-sponsor #yiv8481737338ov
ul {
margin:0;padding:0 0 0 8px;}
#yiv8481737338 #yiv8481737338ygrp-text {
font-family:Georgia;}
#yiv8481737338 #yiv8481737338ygrp-text p {
margin:0 0 1em 0;}
#yiv8481737338 #yiv8481737338ygrp-text tt {
font-size:120%;}
#yiv8481737338 #yiv8481737338ygrp-vital ul li:last-child {
border-right:none !important;
}
#yiv8481737338
Posted by: <zhao.liqing@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (8) |
Tidak ada komentar:
Posting Komentar