G
gator
I have three unbound textboxes on a form. Each textbox is used to input the
amount of money A,B,C deposited. textbox1 is labeled A, textbox2 labeled
B,....
When the user clicks a button, I need to update the table to add a row for A
then add a new row for B and then C.
Below is the code I have so far for the update, but I can't figure out how
to repeat the update for B & C.
Lastly, the table has a field named 'memo'. I would like to add the textbox
caption to that field on each record. So, for the first record, the deposit
field would be whatever number is in the Textbox labled A and the memo would
be A.
here is the code i have for the update.....
Private Sub Command10_Click()
Dim mycon As New ADODB.Connection
Dim adors As New ADODB.Recordset
Set mycon = CurrentProject.Connection
adors.Open "Deposits", mycon, adOpenKeyset, adLockOptimistic
adors.AddNew
adors!amount = Me.Text0
adors!memo = Me.Label1.Caption
adors.Update
adors.Close
mycon.Close
End Sub
thanks
amount of money A,B,C deposited. textbox1 is labeled A, textbox2 labeled
B,....
When the user clicks a button, I need to update the table to add a row for A
then add a new row for B and then C.
Below is the code I have so far for the update, but I can't figure out how
to repeat the update for B & C.
Lastly, the table has a field named 'memo'. I would like to add the textbox
caption to that field on each record. So, for the first record, the deposit
field would be whatever number is in the Textbox labled A and the memo would
be A.
here is the code i have for the update.....
Private Sub Command10_Click()
Dim mycon As New ADODB.Connection
Dim adors As New ADODB.Recordset
Set mycon = CurrentProject.Connection
adors.Open "Deposits", mycon, adOpenKeyset, adLockOptimistic
adors.AddNew
adors!amount = Me.Text0
adors!memo = Me.Label1.Caption
adors.Update
adors.Close
mycon.Close
End Sub
thanks