Need help!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Back
Top