My approach to the challenge (lesson 5) was different than yours, I thought, why keep the menu as an entry form so I create a form for defaults so I can change them any time, then display those defaults on the menu and anywhere I want, like the report. Then on the report OrderR, instead of creating a new field on the Query, I created an unbound label and as a control source used: =IIf([IsPaid],"PAID","NOT PAID") and format accordingly, of course I added: DefaultT to the OrderQ with the fields I need [all of them]. For the Quote I figure out there is a conflict when both fields are checked, so I use a bit of VBA to disable Paid/Unpaid so it won't cause a conflict.
I am learning a lot, still I need more, but is a work in progress.
Thanks Richard, hope you see my comment. it works
Maurice LoucelOP
@Reply 3 years ago
FORGOT to mention:
when I said CONFLICT, I meant stop the user (even if it doesn't matter) from clicking the is paid button, I also made the label of quotation change the label depending on if the check box is true or false, this is my code:
Changed the Label name on the form to QILabel [make it meaningful]
Private Sub IsQuotation_Click()
' make sure the form is not dirty
Refresh
Select Case IsQuotation
Case True
' Disable the checkbox and change the label caption to Is Quotation
Forms!orderf!IsPaid.Enabled = False
Forms!orderf!QILabel.Caption = "Is Quotation"
Case Else
' Enable the checkbox and change the label caption to Invoice
Forms!orderf!IsPaid.Enabled = True
Forms!orderf!QILabel.Caption = "Invoice"
End Select
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 9.