Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / June 2005

Tip: Looking for answers? Try searching our database.

If VB Yes, make label visble, How?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Elliott - 14 Jun 2005 14:41 GMT
How can i make my label visible if the user answers yes to the print?
The label is named   Label470
default is set to label470 visible is no

If vbYes = MsgBox("Do you want to print the customer's receipt?", vbQuestion
+ vbYesNo, "Print Receipt?") Then
   DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70

   If (IsNull(Payment) = False) And (Balance) = 0 Then
       DoCmd.OpenReport "InvoiceReport", acNormal, "",
"[TimeID]=[Forms]![TimeCards]![TimeID]"
   End If

   If [Forms]![TimeCards]![BidDiscAmt] < DSum("Payment", "TPaymentSub",
"TimeID = [Forms]![TimeCards]!TimeID") Then
           Reports!InvoiceReport!QuoteInvLabel.Caption = "Credit Invoice"
   Else
           Reports!InvoiceReport!QuoteInvLabel.Caption = "Invoice"
   End If

End If
Klatuu - 14 Jun 2005 15:51 GMT
See Below

> How can i make my label visible if the user answers yes to the print?
> The label is named   Label470
[quoted text clipped - 12 lines]
> "TimeID = [Forms]![TimeCards]!TimeID") Then
>             Reports!InvoiceReport!QuoteInvLabel.Caption = "Credit Invoice"
              Reports!InvoiceReport!QuoteInvLabel.Visible = True
>     Else
>             Reports!InvoiceReport!QuoteInvLabel.Caption = "Invoice"
              Reports!InvoiceReport!QuoteInvLabel.Visible = True
>     End If
>
> End If
Dave Elliott - 14 Jun 2005 17:37 GMT
tried this and it makes the label470 visible, but does not save it, it does
not show up after closing the form
what can i do?

If IsNull(Balance) Then
Label20.Visible = False
Else
Label20.Visible = (Balance < 0)
End If
If vbYes = MsgBox("Do you want to print the customer's receipt?", vbQuestion
+ vbYesNo, "Print Receipt?") Then
   DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70

   If (IsNull(Payment) = False) And (Balance) = 0 Then
       DoCmd.OpenReport "InvoiceReport", acNormal, "",
"[TimeID]=[Forms]![TimeCards]![TimeID]"
        Forms!TimeCards!Label470.Visible = True

   End If

   If [Forms]![TimeCards]![BidDiscAmt] < DSum("Payment", "TPaymentSub",
"TimeID = [Forms]![TimeCards]!TimeID") Then
           Reports!InvoiceReport!QuoteInvLabel.Caption = "Credit Invoice"
           Forms!TimeCards!Label470.Visible = True
   Else
           Reports!InvoiceReport!QuoteInvLabel.Caption = "Invoice"
           Forms!TimeCards!Label470.Visible = False
   End If

End If
Klatuu - 14 Jun 2005 17:47 GMT
When you close the form, set the save argument in the DoCmd.Close argument to
acSaveYes.  That will save your form with the changes.

> tried this and it makes the label470 visible, but does not save it, it does
> not show up after closing the form
[quoted text clipped - 26 lines]
>
> End If
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.