Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to bind TEXT property to database instead of VALUE
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00187074
Message ID:
00187200
Views:
20
>How can I make the textbox send the TEXT property to its bound field instead of VALUE. Am I missing a property somewhere that controls what goes back to the field? Or is this all just by design and I either have to make the user type the colon or leave it out of the database? I can think of a lot of reasons to send the formatted data back to the database, the most prevalent one being that if I want to do a COPY TO...FILE out of the data table, I have no control over masking the data, and would definitely want the colon to be in there (that's just one example).

As Arnon said, your textbox should be saving it all anyway...

but you have a couple of options. First comes from knowing that a control's controlsource really only does the equivalent of a couple of thing:

in Control.Refresh()
THIS.Value = EVAL(THIS.ControlSource)

in Control.Valid() and Control.ProgrammaticChange()
REPLACE (THIS.ControlSource) WITH THIS.Value

After you know this, then you can unbind your control, and "bind" it yoursself with code. Just use code like above, except replacing "controlSource" with your own proerty or a hardcoded fieldname. Then you can change THIS.Value to THIS.Text.

Another option is: if your table is in a dbc, and you always want the formatting to go to the table, you should put your input mask in the field'snputmask. This would make sure that formatting went into the table, no matter where the input came from.

HTH
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform