What's the best way to "store" and display a value in a text box that
changes from day to day. An example of this would be where the name of the
user is manually typed in after using the datbase, along with (say) the
date.
ATM, I have a table with (say) 4 fields. Each field is linked to a column in
a combo box. The combo box is invisible on the form. The text boxes display
previous data using code something like this...
Private Sub Form_Current()
Me.TxtSR = Me.CmbDt.Column(0, 0)
Me.TxtMS = Me.CmbDt.Column(1, 0)
Me.TxtSRCart = Me.CmbDt.Column(2, 0)
Me.TxtMSCart = Me.CmbDt.Column(3, 0)
End Sub
The combo's table is then updated with something like this when new data is
typed in the text box....
Private Sub TxtMS_AfterUpdate()
Dim rstx As Recordset
Dim Dbx As Database
Set Dbx = CurrentDb
Set rstx = Dbx.OpenRecordset("TbleEnt", dbOpenDynaset)
rstx.MoveFirst
With rstx
.Edit
!EntMs = Me.TxtMS
.Update
End With
rstx.Close
Set Dbx = Nothing
End Sub
Each text box has this code.
Is there a better, more direct way to do this? Its the only way I've thought
of "changing" and storing the value of a text box without adding a row to
the table.
This is in A97
Cheers!