Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing problem
Message
From
12/01/2006 13:31:07
 
 
To
12/01/2006 12:08:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01086069
Message ID:
01086210
Views:
12
>>>>>I am getting a 'wait window' message on a form when I click a button to write a value to a field. ==>> Record pointer is at End_of_file.
>>>>>
>>>>>The symptom - Nothing gets written to the table. Oddly, I do have success writing two values to the table in the form's load method.
>>>>>
>>>>>Why?
>>>>
>>>>ALWAYS add "in workarea" whenever you replace in another work area than the current, like
>>>>Replace myfield with mydata in myworkarea
>>>>*Replace myworkarea.myfield with mydata && This syntax can fail like you describe!!
>>>---------------
>>>
>>>Thank you Tore - Do you ever sleep?
>>
>>Sleep? It's not weekend yet!
>-----------------
>Okay, this getting weird.
>I have removed all the option groups from the details page.
>Then I created a button that, when clicked, moves Date() into a variable.
>Then Under a different button the code, as per your example, runs to write the value to the field.
>It Doesn't write.
>THe next line of code is 'Browse'
>The correct table opens and shows me that the date was not written.
>I know the date is stored in a variable because I added a text box to the form that shows it.
>I have checked every bit of code in the details form, which isn't much anymore. All appears to be okay.
>
>Any leads for me to follow?
>------------------

Where did you define the variable? I mean, are you sure that it's "visible" when you Replace? If you define a variable in let's say a click event, the variable will only be visible to the object in which it is defined. In stead of a variable, try with a property. Persoanlly I use _SCREEN.AddProperty() a lot, for instance _SCREEN.AddProperty('Companyname','My company Ltd'). So in stead of having a variable cCompany I have _SCREEN.Companyname which is always available, just like a public variable. I know that other people use an object based on the Empty class for the same purpose.
Previous
Reply
Map
View

Click here to load this message in the networking platform