Create new record

  • Thread starter Thread starter Del
  • Start date Start date
D

Del

What Access 2000 code can I use to create a new record in a table? The table
is not the record source for the form where I have the code.
 
I need to write a number of variables into the new record and I'm not sure
how to use the append query to do that.
 
thank you for the code
--
Thank you,
Del


ruralguy via AccessMonster.com said:
Something like:
Dim MySQL As String
MySQL = "Insert Into tblNAME(FIELD1, FIELD2, FIELD3) " & _
"Values( '" & Me.txtFIELD1 & "','" & Me.txtFIELD2 & "',27)"
CurrentDB.Execute MySQL, dbFailOnError
Set db = Nothing

Using YOUR FIELD AND CONTROL NAMES of course.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
Back
Top