Timing my Access Form (1 Viewer)

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:27
Joined
May 7, 2009
Messages
19,248
Post a blank dB and I'll import everything in there then I'll post it back.
 

isladogs

MVP / VIP
Local time
Today, 17:27
Joined
Jan 14, 2017
Messages
18,241
I've added code to load the on screen keyboard when in tablet mode.
This is necessary so you can enter text into the answers slot & enter the password to close the form. Without that you're very stuck using this program.

As an increasing number of schools provide tablets for student use, this seemed a useful thing to add

There is no change to the functionality when using a desktop or laptop.
 

Attachments

  • agpTimedForm - CR.accdb
    648 KB · Views: 62

aym

Registered User.
Local time
Today, 09:27
Joined
Aug 20, 2017
Messages
40
I've added code to load the on screen keyboard when in tablet mode.
This is necessary so you can enter text into the answers slot & enter the password to close the form. Without that you're very stuck using this program.

As an increasing number of schools provide tablets for student use, this seemed a useful thing to add

There is no change to the functionality when using a desktop or laptop.

Thanks for the respond sir. I will try it
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:27
Joined
May 7, 2009
Messages
19,248
have it working yet. here is your db.
 

Attachments

  • ayCountDowmTimer.zip
    69.9 KB · Views: 64
  • aym access DB.zip
    79.8 KB · Views: 72

aym

Registered User.
Local time
Today, 09:27
Joined
Aug 20, 2017
Messages
40
have it working yet. here is your db.

It open sir, i will check it and communicate back to you sir.

Thanks

Good day Mr. arnelgp, I was able to get a simple code for the count down time but the problem is that the time was not showing in the text box but when i check the format u sent to me Mr. arnelgp i now discover that a field for the time must be created in the table. So is working now sir. Thanks Sir.

Sir my question now is that if a student login and write the test if such student come back to re-login it should not log-in the student. Is there any thing i can do or a code that will help achieving that.
 
Last edited:

aym

Registered User.
Local time
Today, 09:27
Joined
Aug 20, 2017
Messages
40
Good day Mr. arnelgp, I was able to get a simple code for the count down time but the problem is that the time was not showing in the text box but when i check the format u sent to me Mr. arnelgp i now discover that a field for the time must be created in the table. So is working now sir. Thanks Sir.

Sir my question now is that if a student login and write the test if such student come back to re-login it should not log-in the student. Is there any thing i can do or a code that will help achieving that.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 11:27
Joined
Feb 28, 2001
Messages
27,196
If it is a business rule that a student cannot re-take the test, then you need to be able to remember that the student HAS taken the test. If you have more than one test, then you might need a "junction table" that records the fact that student X has taken test #1 and is thus ineligible to take it again. You would be able to just do a DCount function to see if you have an entry for Student "X" and Test 1. Your count would be 1 or 0 and if 1, the student would be ineligible.

In that case, your login could test for the situation and pop up a message "You have already taken this test" - after which you would do whatever it is that you would do for an ineligible person.
 

aym

Registered User.
Local time
Today, 09:27
Joined
Aug 20, 2017
Messages
40
If it is a business rule that a student cannot re-take the test, then you need to be able to remember that the student HAS taken the test. If you have more than one test, then you might need a "junction table" that records the fact that student X has taken test #1 and is thus ineligible to take it again. You would be able to just do a DCount function to see if you have an entry for Student "X" and Test 1. Your count would be 1 or 0 and if 1, the student would be ineligible.

In that case, your login could test for the situation and pop up a message "You have already taken this test" - after which you would do whatever it is that you would do for an ineligible person.


Thanks for ur urgent respond

The only problem i had is when a student submit before timeout then if such student re-login the test will open again but if the time finish whenever the student login the form will display and close automatically. i need a solution.

thanks
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:27
Joined
May 7, 2009
Messages
19,248
add a validation to Student ID textbox.
Use Dlookup on table StudentAnswer, (on
my sample db).

Code:
Private Sub txtStudentID_AfterUpdate()
    If DCount("*", "tblStudentAnswer", "StudentID=" & Chr(34) & Me.txtStudentID & Chr(34)) Then
        MsgBox "You already have taken the exam!"
        Application.Quit
    End If
End Sub
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 11:27
Joined
Feb 28, 2001
Messages
27,196
ArnelGP's answer is valid as to the code. Your problem MIGHT be where to put this code, and that kind of depends on your setup. The description in post #30 of the thread is unclear and doesn't help.

If you implement a "test taken" table then a couple of things COULD happen.

If you put code under the SUBMIT function (I assume a command-button OnClick event), you can make the entry as I described so that in subsequent attempts to take a test, the same form's OnOpen routine can block entry by saying, "You have taken the test." And a FormOpen event can be canceled, which would stop the student in his tracks.

But, if you have a form to allow multiple different tests and the student has to select one, you would simply wait until the student selected the desired exam and do your test then. If the student has taken the test already, you would a DoCommand Close function to close the form.
 

Users who are viewing this thread

Top Bottom