Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot get the data in the table!!!!
Message
 
To
29/09/2001 01:20:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00562204
Message ID:
00562212
Views:
17
Eric,

Is the form name 'register'? If it is the proper object reference for the text box is thisform.txtlname.value . . . One way to verify this is to right click inside the screen where your code to save it is located. Select 'Object List', then click on the object list for the text box. It will give you the object reference relative to where you are at. Also, I see 'Do' and 'EndDo' in your code which suggests that you are trying to update this table from procedural code which is not in one of the methods or behind the controls of your form (like a command button). Unless you pass as a parameter the value of the field to the procedural code, the procedural code has no way of referencing the value(s) in the form objects.

Hope this gets you somewhere.

Bill


>I am new to VFP, please help!! I can't seem to get the value in register.txtcustid.value in the program below in the table. On a form is there something different about typing data in the text box vs storing data in it programmatically. Also, the field the value should be stored to in the table is the primary key. I don't know if that is prohibiting the field from accepting the data. I have tried using Replace and Insert Into neither seems to work. The program below is where I generate the value for the field. I can see the proper value in the text box but it won't store to the table.
>
>local nSuffix, cInitials
>
>cInitials = Left(register.txtFname.value,2) +;
> Left(register.txtlname.value,2)
>nSuffix = 0
>
>Locate for cust.custid = cInitials
> Do While Found()
> nSuffix = nSuffix + 1
> cInitials = Left(cInitials,4) + Alltrim(Str(nSuffix))
> Continue
> Enddo
>register.txtcustid.value = cInitials
CySolutions, Medical Information Technology
You're only as good as your last
success, so . . .If it works. . .don't fix it!
Previous
Reply
Map
View

Click here to load this message in the networking platform