G Guest Feb 8, 2005 #1 Is it possible to call a form to insert a few field values for the same table as the originating form? How can it be done? Thank you, -Me
Is it possible to call a form to insert a few field values for the same table as the originating form? How can it be done? Thank you, -Me
M Michel Walsh Feb 15, 2005 #2 Hi, The data is hold in a table, not in the form itself. You can use VBA code like: CurrentDb.Execute "INSERT INTO table(listOfFields) VALUES(listOfValues)", dbFailOnError or DoCmd.RunSQL "INSERT INTO tableName(f1, f2) VALUES(FORMS!formName!control1, FORMS!formName!Control2) " (the DoCmd syntax supports the FORMS!FormName!ControlName, CurrentDb.Execute does not). Hoping it may help, Vanderghast, Access MVP
Hi, The data is hold in a table, not in the form itself. You can use VBA code like: CurrentDb.Execute "INSERT INTO table(listOfFields) VALUES(listOfValues)", dbFailOnError or DoCmd.RunSQL "INSERT INTO tableName(f1, f2) VALUES(FORMS!formName!control1, FORMS!formName!Control2) " (the DoCmd syntax supports the FORMS!FormName!ControlName, CurrentDb.Execute does not). Hoping it may help, Vanderghast, Access MVP