I am using Access 2000 and I would like to make a data entry form
(frmDataEntry)
I want to append a newrecord to a table (tblPeople) and populate the new
record from two Textboxes (txtName and txtAge) The table has two fields,
Name and Age.
I used a command button (the command button wizard, record operations,Add
New Record) and it generates the code snippet below.
I think I have to add some code in the area I marked with question marks in
the snippet, something like:
XXXXXXX = Me.txtName and YYYYYYYY = Me.txtAge.
How do I refer to the Name and Age fields in the new record?
Help would be greatly appreciated.
*************** ***** snippet ***********
Private Sub commandAddRecor d_Click()
On Error GoTo Err_commandAddR ecord_Click
DoCmd.GoToRecor d , , acNewRec
'
' ?? move data from textboxes to table??
'
Exit_commandAdd Record_Click:
Exit Sub
Err_commandAddR ecord_Click:
MsgBox Err.Description
Resume Exit_commandAdd Record_Click
End Sub
*************** ***** snippet ***********
(frmDataEntry)
I want to append a newrecord to a table (tblPeople) and populate the new
record from two Textboxes (txtName and txtAge) The table has two fields,
Name and Age.
I used a command button (the command button wizard, record operations,Add
New Record) and it generates the code snippet below.
I think I have to add some code in the area I marked with question marks in
the snippet, something like:
XXXXXXX = Me.txtName and YYYYYYYY = Me.txtAge.
How do I refer to the Name and Age fields in the new record?
Help would be greatly appreciated.
*************** ***** snippet ***********
Private Sub commandAddRecor d_Click()
On Error GoTo Err_commandAddR ecord_Click
DoCmd.GoToRecor d , , acNewRec
'
' ?? move data from textboxes to table??
'
Exit_commandAdd Record_Click:
Exit Sub
Err_commandAddR ecord_Click:
MsgBox Err.Description
Resume Exit_commandAdd Record_Click
End Sub
*************** ***** snippet ***********
Comment