I'm working on a program for checking in and out books for our companys library.
I have a couple check boxes for whether or not the book is in or out.
when you click the check out button the check box automatically changes to out and todays date is entered in the out date field (ODATE)(Date/Time field) and the due date field (DDATE))(Date/Time field) is today +14 days. There is also a field for the employees name (EMPLOYEENAME) (TEXT field)for who is checking out the book. Department (DEPARTMENT) (Also a txt field). and a few others . This part is working fine. My problem is when the book gets checked back in. I have a button for check in that changes the status to IN and clears the ODATE, DDATE, and a few others. That part works fine. But it won't clear the EMPLOYEENAME and DEPARTMENT (TEXT) fields. here is the code I have:
Private Sub CheckIn_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCheckout"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Me.In = True
If Me.In = True Then
Me.Out = False
Me.ODate = Null
Me.DDate = Null
Me.EmployeeName = Null
Me.Department = Null
Refresh
End If
When I start typing the me.out a box appears with the different options I can put in after the me. however the EmployeeName and Department isn't listed as an option.
I hope I haven't confused you too much.
Thanks,
Rick
I have a couple check boxes for whether or not the book is in or out.
when you click the check out button the check box automatically changes to out and todays date is entered in the out date field (ODATE)(Date/Time field) and the due date field (DDATE))(Date/Time field) is today +14 days. There is also a field for the employees name (EMPLOYEENAME) (TEXT field)for who is checking out the book. Department (DEPARTMENT) (Also a txt field). and a few others . This part is working fine. My problem is when the book gets checked back in. I have a button for check in that changes the status to IN and clears the ODATE, DDATE, and a few others. That part works fine. But it won't clear the EMPLOYEENAME and DEPARTMENT (TEXT) fields. here is the code I have:
Private Sub CheckIn_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCheckout"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Me.In = True
If Me.In = True Then
Me.Out = False
Me.ODate = Null
Me.DDate = Null
Me.EmployeeName = Null
Me.Department = Null
Refresh
End If
When I start typing the me.out a box appears with the different options I can put in after the me. however the EmployeeName and Department isn't listed as an option.
I hope I haven't confused you too much.
Thanks,
Rick