View Full Version : Adding records directly to a table.


Freakinchair
08-13-2007, 12:18 PM
Here is basically what I have and what I need to do:

I have a form with several text boxes which are going to be filled in. Clicking on a button at the bottom of the form will save this information into a table (the table associated with the form). However, it also needs to fill in a junction table with two known values derived from these text boxes.

I have FILE_NUMBER_CD and INSPECTOR_NUMBER_CD that are the only attributes in the table called "XREF_FILE_INSPECTOR" which need to be added as new records.

So basically, what I need to know is how do I add known values derived from a textbox directly into a table.

Thanks for any help!

shudini
08-13-2007, 12:46 PM
have your button also run a SQL Insert statement (DoCmd.RunSQL) that is composed of a string that is built using the values from the text boxes.