Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference in values between table value and field value on form

Status
Not open for further replies.

Mojster

Programmer
Sep 26, 2001
18
SI
Is it possible to make, that the field on form shows (for example) value 123-123, but the value in the table is 123123 ?

Thanks!
 
If the field on the form is for display only (i.e. not for data entry), and if your data is consistent, e.g. always six digits, you could use a calculated field with a formula like this:

iif(size([:NEWBLE:MEMBERS.YNumber]) = 6, subStr([:NEWBLE:MEMBERS.YNumber],1,3) + "-" + subStr([:NEWBLE:MEMBERS.YNumber],4,3), [:NEWBLE:MEMBERS.YNumber])

In the above case, the field, YNumber, is in a table ":NEWBLE:MEMBERS.DB

If you need to have the field for data entry, then I think you will need some tricky enough code, and it may be easier to maintain 2 fields - one for what you want to have displayed/entered (use a picture) and one for "internal" use. When a record gets written/updated, use code to update the "internal" field.

HTH
Padraig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top