Senin, 28 Januari 2019

Re: [MS_AccessPros] Debug.Print does not work

 

https://www.tek-tips.com/faqs.cfm?fid=7148 has more information on trouble shooting your code issues. 

You also need to click the Debug->Compile from the ribbon in the VBA window.

Regards,
Duane


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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/MS_Access_Professionals/join
    (Yahoo! ID required)

<*> To change settings via email:
    MS_Access_Professionals-digest@yahoogroups.com
    MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

__._,_.___

Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

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