I have a Visual Basic program that is attached to a 97 access database. I have 6 buttons where users make themselves available and a caption pops up and states that "your name" has been made available. It also calls into play NOW which give the time on the keyboard/machine. How can i save this information with the time and name of the person into either a database or into a text file. Here is the code for one if the buttons.
Code:
[Private Sub cmdScharlette_Click()
On Error GoTo Errortrap
frmAssign.datAvail.Recordset.MoveFirst
frmAssign.datAvail.Recordset.MoveNext 'Move to the 2nd record(Scharlette's)
If frmAssign.txtAvail.Text = 1 Then
frmAssign.txtAvail.Text = 0
lblStatus.Caption = " " & Now & "- Scharlette has been made Unavailable."
ElseIf frmAssign.txtAvail.Text = 0 Then
frmAssign.txtAvail.Text = 1
lblStatus.Caption = " " & Now & "- Scharlette has been made Available."
End If
frmAssign.datAvail.Recordset.MoveFirst
RefreshAvail
Exit Sub
Errortrap:
wait (50)
Return]
Comment