View Full Version : Append from form to table


umdloti
10-13-2000, 03:15 AM
Let me ask this in another way.

How can I append info from an unbound text box on a form to a table.

ie Unbound text box, called Date on
Form1

Need to append this to table Orders, field [Date] ???

Thanks

Former
10-13-2000, 07:14 AM
You'll could write some code for the form....

Dim db As Database
Dim rs As Recordset

Set db = CurrentDb
Set rs = db.OpenRecordset("Orders")

With rs
.AddNew
.Fields("Date") = Me.UnboundTextBoxName.Value
.Update
End With

Place this code on a event, e.g. a click of a button
rs.Close

Former
10-13-2000, 07:15 AM
Sorry that rs.close should be with the code, to close the recordset