Button Code needed

B

Bob V

Private Sub Command8_Click()
tbOverdue.value = " ", "This Total is Overdue"
End Sub

If you click the Button you get Blank you click it again you get "This
Total is Overdue" You click it again you get Blank
Thanks for any Help.....Bob
 
J

John W. Vinson

Private Sub Command8_Click()
tbOverdue.value = " ", "This Total is Overdue"
End Sub

If you click the Button you get Blank you click it again you get "This
Total is Overdue" You click it again you get Blank
Thanks for any Help.....Bob

I'm sorry, this makes no sense to me. What kind of control is tbOverdue? What
are you expecting? A control's value can only have one value - what is the
intent of giving it two comma separated values?

John W. Vinson [MVP]
 
J

JK

Hi Bob,

Me.tbOverdue = IIf(IsNull(Me.tbOverdue),"This Total Is Overdue",Null)

Regards
Jacob

|
|
| Private Sub Command8_Click()
| tbOverdue.value = " ", "This Total is Overdue"
| End Sub
|
| If you click the Button you get Blank you click it again you get "This
| Total is Overdue" You click it again you get Blank
| Thanks for any Help.....Bob
|
|
 
B

Bob V

John, the control is assigining tbOverdue which is a text box hence the tb,
Im sure access can get a control to change a text box to show either " "
(which means blank, I thought untill JK has shown me its Null ,Sorry) or
"This total is overdue" Thanks Bob
 
J

John W. Vinson

John, the control is assigining tbOverdue which is a text box hence the tb,
Im sure access can get a control to change a text box to show either " "
(which means blank, I thought untill JK has shown me its Null ,Sorry) or
"This total is overdue" Thanks Bob

Ok... a couple of things here.

Of course Access can set a control to NULL, or to " " (which are emphatically
*NOT* the same), or to "This total is overdue".

But you cannot set the control to NULL and also to "This total is overdue" at
the same time.

And if you want to have it set the control to one or the other of these
values, you need some way to decide WHICH of them you want to set it to.

Could you step back a bit and describe what you are working with, and what you
want the user to see?

John W. Vinson [MVP]
 
B

Bob V

Thanks John, I created a combo box with the drop down Value "";This total is
Overdue; so I can select if I want to show this on my report!
Regards Bob ps You couldn't look at my "Visible report Code" on this Access
Group....Thanks Bob
 
J

John W. Vinson

Thanks John, I created a combo box with the drop down Value "";This total is
Overdue; so I can select if I want to show this on my report!

I'm sorry, this is making no sense to me. It appears to have nothing in common
with your code other than the two values.

A Combo Box can have only ONE value - not two. It can *display* up to ten
columns, but one of them - only one - is the bound column.

John W. Vinson [MVP]
 
Top