G
Guest
good day.
im making a simple cafe timer with the following:
Table: Transactions
TransID Autonumber
ComputerID Number
TimeIn Date/Time
TimeOut Date/Time
Paid Yes/No
Remarks Text
Table: Computers
ComputersID Autonumber
ComputerName Text
The form looks like this:
www.geocities.com/thebelovedangel/1.jpg
in the form's on timer event at 60000 interval, a new form will popup with
the following Query as recordsource:
SELECT Transaction.ComputersID FROM [Transaction] WHERE
(((Format([TimeIn],'Short Date'))=Format(Now(),'Short Date')) AND
((Format([TimeOut],'Short Time'))<Format(Now(),'Short Time')) AND
((Transaction.Paid)=No));
the purpose of this new form is to make a list of the computers whose
TimeOut field had gone past the current time ("Now()"). if that new form has
no records, it will close itself.
it worked once or twice i think so i thought it was done but then when i
compacted and repaired the db and made a dry run, it suddenly said:
"The table 'Transactions' is already opened exclusively by another user, or
it is already open through the user interface and cannot be manipulated
programmatically. (Error 3008)"
i tried redoing it but at no avail. still got the same message. i dont
know what happened. it would not be a good idea to close the main form and
open the list form, right? i dont know where i was left out. =(
i really would love to hear your comments and suggestions if it wouldnt be a
bother.
thank you.
P.S.
i also tried something like this one instead of the new form (but it didnt
work):
Private Sub Form_Timer()
Dim myrecordset As ADODB.Recordset
Set myrecordset = New ADODB.Recordset
myrecordset.open "SELECT Transaction.ComputersID FROM [Transaction] WHERE
(((Format([TimeIn],'Short Date'))=Format(Now(),'Short Date')) AND
((Format([TimeOut],'Short Time'))<Format(Now(),'Short Time')) AND
((Transaction.Paid)=No))"
If myrecordset.EOF Then
myrecordset.close
set myrecordset = nothing
Exit Sub
else
'some other codes to display what is on myrecordset
end if
end sub
im making a simple cafe timer with the following:
Table: Transactions
TransID Autonumber
ComputerID Number
TimeIn Date/Time
TimeOut Date/Time
Paid Yes/No
Remarks Text
Table: Computers
ComputersID Autonumber
ComputerName Text
The form looks like this:
www.geocities.com/thebelovedangel/1.jpg
in the form's on timer event at 60000 interval, a new form will popup with
the following Query as recordsource:
SELECT Transaction.ComputersID FROM [Transaction] WHERE
(((Format([TimeIn],'Short Date'))=Format(Now(),'Short Date')) AND
((Format([TimeOut],'Short Time'))<Format(Now(),'Short Time')) AND
((Transaction.Paid)=No));
the purpose of this new form is to make a list of the computers whose
TimeOut field had gone past the current time ("Now()"). if that new form has
no records, it will close itself.
it worked once or twice i think so i thought it was done but then when i
compacted and repaired the db and made a dry run, it suddenly said:
"The table 'Transactions' is already opened exclusively by another user, or
it is already open through the user interface and cannot be manipulated
programmatically. (Error 3008)"
i tried redoing it but at no avail. still got the same message. i dont
know what happened. it would not be a good idea to close the main form and
open the list form, right? i dont know where i was left out. =(
i really would love to hear your comments and suggestions if it wouldnt be a
bother.
thank you.
P.S.
i also tried something like this one instead of the new form (but it didnt
work):
Private Sub Form_Timer()
Dim myrecordset As ADODB.Recordset
Set myrecordset = New ADODB.Recordset
myrecordset.open "SELECT Transaction.ComputersID FROM [Transaction] WHERE
(((Format([TimeIn],'Short Date'))=Format(Now(),'Short Date')) AND
((Format([TimeOut],'Short Time'))<Format(Now(),'Short Time')) AND
((Transaction.Paid)=No))"
If myrecordset.EOF Then
myrecordset.close
set myrecordset = nothing
Exit Sub
else
'some other codes to display what is on myrecordset
end if
end sub