Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot get the data in the table!!!!
Message
From
29/09/2001 04:50:46
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
29/09/2001 01:20:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00562204
Message ID:
00562217
Views:
19
>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

Eric,
First do not use object reference starting with formname (I think register is form name). While it works here it's likely to bomb when you have another instance of the form. thisform.txtCustId is a better one.
Controlsource is empty as I get. Insert is not inserting the record and no error message makes me think you use buffering and do not tableupdate (replace might be issued at eof too).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform