I have a form's textboxes populated with data from 2 recordsets.
sSQL$ = "SELECT * From MASTER Where PAYEMP='" & FEmp$ & "'"
rsAccess.Open sSQL$, Access, adOpenKeyset, adLockOptimistic
sSQL$ = "SELECT * From Tax WHERE PAYEMP='" & FEmp$ & "'"
rsAccess2.Open sSQL$, Access, adOpenKeyset, adLockOptimistic
For A% = 0 To 14
Set text(A%).DataSource = rsAccess
Next A%
text(0).DataField = "PAYEMP"
text(1).DataField = "FSTNAME"
text(2).DataField = "LNAME"
text(3).DataField = "FlexField"
text(4).DataField = "ADDR"
text(5).DataField = "CITY"
For A% = 15 To 30
Set text(A%).DataSource = rsAccess2
Next A%
''etc
First problem, if a change has been made, it is not automatically saved when the program is closed. What do I need to do to apply the changed textbox to the database?
Next problem, if I attempt a change, then try to close the recordset, I get an error. I'm hoping the first question will solve this problem.
Thanks
Catrina [sig][/sig]
sSQL$ = "SELECT * From MASTER Where PAYEMP='" & FEmp$ & "'"
rsAccess.Open sSQL$, Access, adOpenKeyset, adLockOptimistic
sSQL$ = "SELECT * From Tax WHERE PAYEMP='" & FEmp$ & "'"
rsAccess2.Open sSQL$, Access, adOpenKeyset, adLockOptimistic
For A% = 0 To 14
Set text(A%).DataSource = rsAccess
Next A%
text(0).DataField = "PAYEMP"
text(1).DataField = "FSTNAME"
text(2).DataField = "LNAME"
text(3).DataField = "FlexField"
text(4).DataField = "ADDR"
text(5).DataField = "CITY"
For A% = 15 To 30
Set text(A%).DataSource = rsAccess2
Next A%
''etc
First problem, if a change has been made, it is not automatically saved when the program is closed. What do I need to do to apply the changed textbox to the database?
Next problem, if I attempt a change, then try to close the recordset, I get an error. I'm hoping the first question will solve this problem.
Thanks
Catrina [sig][/sig]