Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Illegal Redefinition of Variable???
Message
From
23/03/2002 15:33:52
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00636472
Message ID:
00636497
Views:
20
Hi Sebastian:

>Hi, Ravi!
>Please tell us a little bit more abaout the kind of usage of this variable (post some code snippets) to find out what's wrong!
>
- mMedName is declared as Public in the Init method of the form
- mMedName is the ControlSource for Text1.
- If the user enters a new value into Text1, this new value is then inserted into the Prescriptions table, when the Save button is clicked.
INSERT INTO Prescriptions(PresRef, MedName, orderdate, healthnum,;
docnum, docname, physref,PatientNam) ;
VALUES (mTabRef, mMedName, mdate, mHealthNum, mDocnum, mDoctor, mPhysRef,;
	mPatientName)

* Clear the contents of the variable to hold new info
mMedName = ""
The above is for the data entry screens (pageframes).

The user can also view what they have entered and modify the contents in another form. (pageframes)

- mMedName is in the Init of the form as a String
- Beyond that part, mMedName is not used anywhere else in the second form.
- But the message surfaces only after the second form has been fired.

>BTW: The help file says "The PUBLIC or LOCAL command tried to change the state of a variable that already exists." - are you dealing with SCATTER MEMVAR or related commands?

No, I tie textboxes to varaiables and manipulate data using insert, update and delete statements.

- Ravi
- Ravi

True greatness consists in being great in little things.
- Charles Simmons
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform