Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>I'm fairly new to VFP and I'm having a few problems. Could some kind soul explain to me what is going on here?
>
>Problem 1
>I have a field - Folio_Id displayed on a table maintenance form. It's numeric and has a length of 6, no decimal places.
>I want for the user to be able to enter from 1 to 6 digits and have it filled with leading zeros when they leave the field.
>
>If I specify a Format code of 'L' on the field, when I enter the first digit, the field then fills with TRAILING zeros !?!
>It doesn't matter whether I put the format code in the table designer display format or in the textbox format property
>of the form (or both!) - I cant get any leading zeros noway, nohow!
>
>If I remove the format codes and enter '1234567', on hitting '7' the field changes to '100000' - ie 7 digits, 6 trailing zeros!
>
>If I enter '123' the field is displayed right-justified as expected. If I now highlight the value and start typing or hit 'delete', I can only enter 3 digits before focus moves off the field !?!
>
>Is there some basic tenet in the use of numeric fields I'm missing here?
>Since this field is a key and not to be used in any kind of arithmetic I suppose I should I be using a Character datatype? But then how would I get leading zeros without jumping through hoops?
>
Are you populating the fields with you tables? If not, the form will assume that the text box is a character. Place a 0 in the value property of the textbox to force it to numeric. Place an 'L' in the Format Property, this will give you leading zeros. I just tried and it works for me.
>
>Problem 4
>The thing that is really bugging me - unrelated to the above, is the frequency with which VFP5 is crashing.
>This invariably happens soon after I encounter a runtime error in my testing. I can generally cancel the program and close all files, but the next time I rebuild the app, VFP will likely cause an exception error and crash - Dr. Watson I presume!
>A couple of developers I've spoken to say this hardly ever happens to them. I see it several times a day.
>I've tried reinstalling, maximizing Windows Virtual memory size,etc.
>I'm using VFP 5 Prof. Ed. running on NT Workstation 4. Any ideas why this might be happening?
I am running the same OS as you are running and I don't seem to have these problems, perhaps there is an setting in NT that you need to change.
Ed
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement