Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Error after deleting fields in .DBF file and form

Status
Not open for further replies.

PabloHaughton

Programmer
Jan 18, 2006
4
HN
I created a form using the form Wizard and added some new fields to it.
Later I decided to remove these fields from the form and also from the .DBF file that is in a Database (.DBC).
To my surprise, when I run the form it still looks for the fields I deleted from the form and table.
I get the following error:

variable 'varname' is not found.
Error: 12
Variable 'varname' is not found.
Method: embossedform.dataenvironment.OpenTables
Line: 0

Is there a special place where you have to go and remove field references also?
 
Right click on the form, select "Data Environment" from the drop down.

Delete the table if it peresist, or answer "Yes" to removing the reference if VFP asks that, then just close the DE, save the form, and that issue should go away.


Best Regards,
Scott

"Everything should be made as simple as possible, and no simpler."[hammer]
 

Pablo,

Whenever you delete fields from a DBF, be sure to delete any relevant indexes as well. If an index expression contains the field you just deleted, you will see the error you described.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top