Ms Access Form with 2 table connection

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

Guest

I have a form with a Record Source = MasterList table but i want a control to
insert a new record in another table call ContactList, how am i going to do
that?
 
Use an insert SQL

Docmd.RunSql "INSERT INTO TableName ( DateFieldName, StringFieldNAme,
NumberFieldName) VALUES (#" & DateParameter & "#,'" & StringParameter & "' ,
" & NumberParameter &")"

If you want to add a values from fields in the form, change the parameter to
Me.FieldName
Note the different between date (need #) string (need ') and number (need
nothing)
 
Back
Top