General information
Category:
Coding, syntax & commands
Title:
Cannot get the data in the table!!!!
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only