Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Conditional Text on Form help needed (should be simple code)

1 view
Skip to first unread message

GBH333

unread,
Feb 25, 2001, 3:15:20 PM2/25/01
to
I have a simple inventory listing type FORM where I want a text field to appear
next to the main inventory ITEM field saying "See Notes", but I only want this
text to appear if there is any text in the NOTE field of my Table. I don't
want this field to appear unless there is a NOTE in the NOTE field.

I know how to place text fields, hide labels, etc, and all the usual things,
but I cannot seem to come up with the simple code to do this simple task.

Key Table elements (among others) are:
ITEM (field)
NOTE (field)

Thank you
Byron Hill

AntlerSoft

unread,
Feb 26, 2001, 11:24:11 AM2/26/01
to
Your right, it's simple.

On the "NewValue" method of the notes field, add this code

doDefault
if self.isBlank() then
self.visible = true
else
self.visible = false
endIf

This will make the notes field visible only when there is something in it.

RCarmichel

unread,
Feb 27, 2001, 2:38:19 PM2/27/01
to

Have you tried iif? On the NewValue of the ITEM field, try something like :

dodefault ; important
iif(notes.isblank(),fldComment = "",fldComment = "See Notes")

HIH.

Russ
Russ Carmichael
RCarm...@aol.com (remove 'NOSPAM' )
'You can't be a Real Country unless you have a BEER and an airline. It helps if
you have some kind of a football team, or some nuclear weapons, but at the very
least you need a BEER' Frank Zappa

Shahussein

unread,
Mar 5, 2001, 5:20:02 AM3/5/01
to
In the NewValue method (in-built method) of the ITEM field object, write this
code:

If TableTcursor.Note.isBlank() then
TextObject.visible=False
else
TestObject.visible=True
endIf

TableCursor is a declared TCursor pointing to the forms table, and TextObject
is name you have given to your Text ("See Notes") on the Form.

Hussein

0 new messages