From: rbb101 on 17 May 2010 14:20 On a form I have two controls named [Con1] and [Con2]. On Exit of a third control [ConComm], I am trying to change the font of Label304 only if [Con1] And [Con2] are Not empty or Not Null. So If both [Con1] and [Con2] have entries, then Me.Label304.Forecolor=50787 Else (if there are no entries) Me.Label304.Forecolor= 6697728
From: Marshall Barton on 17 May 2010 15:25 rbb101 wrote: >On a form I have two controls named [Con1] and [Con2]. On Exit of a third >control [ConComm], I am trying to change the font of Label304 only if [Con1] >And [Con2] are Not empty or Not Null. > >So If both [Con1] and [Con2] have entries, >then Me.Label304.Forecolor=50787 Else (if there are no entries) >Me.Label304.Forecolor= 6697728 If the for is displayed in single view, you can use VBA code to do that: If Not IsNull(Con1) And NotIsNull(Con2) Then Me.Label304.Forecolor=50787 Else 'if there are no entries Me.Label304.Forecolor= 6697728 End If -- Marsh MVP [MS Access]
From: rbb101 on 18 May 2010 07:48 Thanks. Thats exactly what I was looking for. "Marshall Barton" wrote: > rbb101 wrote: > > >On a form I have two controls named [Con1] and [Con2]. On Exit of a third > >control [ConComm], I am trying to change the font of Label304 only if [Con1] > >And [Con2] are Not empty or Not Null. > > > >So If both [Con1] and [Con2] have entries, > >then Me.Label304.Forecolor=50787 Else (if there are no entries) > >Me.Label304.Forecolor= 6697728 > > > If the for is displayed in single view, you can use VBA code > to do that: > > If Not IsNull(Con1) And NotIsNull(Con2) Then > Me.Label304.Forecolor=50787 > Else 'if there are no entries > Me.Label304.Forecolor= 6697728 > End If > > -- > Marsh > MVP [MS Access] > . >
|
Pages: 1 Prev: Using textbox using a variable Next: Problem with Combo Box FindNext |