I am new to access and have absolutley no training. I am familiar with other db applications, but this is the one that has been given to me to work with. I have a simple database consisting of 2 tables. Table 1 (BookInfo) contains a barcode, checkin, checkout and inout flag among other fields. Table 2 (ScanInfo) contains a barcode and scandate field. Both tables will eventually get bigger, but this is what I am starting with. What I want to do is Scan a book in to ScanInfo then, OnExit from the barcode field run the following script:
Private Sub BarCode_Exit(Ca ncel As Integer)
If ([InOutFlag] = True) Then
[LastOut] = Date
[InOutFlag] = False
Else
[LastIn] = Date
[InOutFlag] = True
End If
End Sub
First, I am not sure what Cancel As Integer means, it was in their by default when I created the script and the script doesn't seem to run without it.
Second, even though the script runs, it does not appear to do anything. I believe it is because I haven't saved the record in Table1, but I can't locate a command to do that.
If I knew what I was doing, this would be simple. I have already spent too much time looking around for help on this, so I hope someone here can make me not so clueless.
Thanks
Private Sub BarCode_Exit(Ca ncel As Integer)
If ([InOutFlag] = True) Then
[LastOut] = Date
[InOutFlag] = False
Else
[LastIn] = Date
[InOutFlag] = True
End If
End Sub
First, I am not sure what Cancel As Integer means, it was in their by default when I created the script and the script doesn't seem to run without it.
Second, even though the script runs, it does not appear to do anything. I believe it is because I haven't saved the record in Table1, but I can't locate a command to do that.
If I knew what I was doing, this would be simple. I have already spent too much time looking around for help on this, so I hope someone here can make me not so clueless.
Thanks
Comment