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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top