I got it working again. I don't know what I did. I swear sometimes either I have an evil twin that undoes what I did or I slip in to non-linear time.
Liz Ravenwood
Database Developer / Programmer
Super First Class Products
B/E Aerospace
O: 1.520.239.4808
www.beaerospace.com
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Crystal
Sent: Thursday, March 15, 2012 3:55 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] RE: Crystal, I've lost an old email and
Hi Liz,
glad you found the code :)
Conditional formatting must be applied to each control. So the expression that controls the visibility of LotNum would be:
IIF(VisLot=true, true, false)
1. click on the control containing the LotNum field to select it
2. invoke Conditional Formatting (icon on ribbon)
3. the above is what goes into the textbox for the Rule when you choose --> expression
4. set whatever formatting you desire ;)
If the expression is True, the conditional formatting will happen!
Warm Regards,
Crystal
Microsoft MVP
http://www.AccessMVP.com/strive4peacehttp://www.YouTube.com/LearnAccessByCrystal
*
(: have an awesome day :)
*
________________________________
From: Liz Ravenwood <liz_ravenwood@beaerospace.com>
To: "'MS_Access_Professionals@yahoogroups.com'" <MS_Access_Professionals@yahoogroups.com>
Sent: Thursday, March 15, 2012 3:53 PM
Subject: [MS_AccessPros] RE: Crystal, I've lost an old email and
However, which form or field event do I put this: IIF(VisLot=true, true, false)
I had it on the onclick of the field and I'm not sure why and if it had ever really worked there. Duh.
Liz Ravenwood
Database Developer / Programmer
Super First Class Products
B/E Aerospace
O: 1.520.239.4808
www.beaerospace.com
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Liz Ravenwood
Sent: Thursday, March 15, 2012 2:52 PM
To: 'MS_Access_Professionals@yahoogroups.com'
Subject: [MS_AccessPros] RE: Crystal, I've lost an old email and
I found it Crystal!
'~~~~~~~~~~~~~~~~~~~~~~~
Function GetVisible_LotNum( _
pReference As String _
, pSNRequired As String _
, pPNQTY As Double _
, pIsCd As String _
) As Boolean
GetVisible_LotNum = False
Select Case Left(pReference, 2)
Case "BA", "EK", "DL", "ET"
If Trim(pSNRequired) = "Y" And pPNQTY > 0 Then
GetVisible_LotNum = True
End If
Case Else
If (pIsCd = "I" And pPNQTY > 0) Then
GetVisible_LotNum = True
'Me.SN.Visible = False
End If
End Select
End Function
'~~~~~~~~~~~~~~~~~~~~~~~
Function GetVisible_SN( _
pReference As String _
, pSNRequired As String _
, pPNQTY As Double _
, pIsCd As String _
) As Boolean
If (pIsCd = "I" And pPNQTY > 0) Then
GetVisible_SN = False
Else
GetVisible_SN = GetVisible_LotNum(pReference, pSNRequired, pPNQTY, pIsCd)
End If
End Select
End Function
'~~~~~~~~~~~~~~~~~~~~~~~
NOTE:
Ideally, parameters will be validated before they are tested ~~
then in the SQL for the form RecordSource, add these 2 calculated fields:
VisLot: GetVisible_LotNum([Ref], [SNRequired], [PNQTY], [IsCd])
VisSN: GetVisible_SN ([Ref], [SNRequired], [PNQTY], [IsCd])
test VisLot and VisSN, which both equate to True or False, for your conditional formatting rules.
Conditional formatting must be applied to each control. So the function that controls the visibility of LotNum would be:
IIF(VisLot=true, true, false)
Liz Ravenwood
Database Developer / Programmer
Super First Class Products
B/E Aerospace
O: 1.520.239.4808
www.beaerospace.com
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Liz Ravenwood
Sent: Thursday, March 15, 2012 2:21 PM
To: 'MS_Access_Professionals@yahoogroups.com'
Subject: [MS_AccessPros] Crystal, I've lost an old email and
Crystal, some time ago you had some brilliant code for a field of mine to function by conditional formatting based on a true/false value and then the function that the query as the recordsource calls.
I've got something broken and failed to keep the body of your email as documentation (woops) and need your help again if you could please.
I've got this: =IIf([VisSN]=True,True,False) in my field onclick event which makes no sense and I think something got skewampled.
Do you remember?
Liz Ravenwood
Database Developer / Programmer
Super First Class Products
B/E Aerospace
O: 1.520.239.4808
www.beaerospace.com
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
------------------------------------
Yahoo! Groups Links
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
------------------------------------
Yahoo! Groups Links
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
------------------------------------
Yahoo! Groups Links
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Jumat, 16 Maret 2012
RE: [MS_AccessPros] RE: Crystal, I've lost an old email and
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar