Please help...tick checkbox before proceeding to next record

MikeFord

Registered User.
Local time
Today, 13:13
Joined
Jun 29, 2007
Messages
25
Apologies as I've already asked this question in the forms section of the forum but the responses were a bit on the light side...I'm now getting desperate having spent much of the day trying other sources such as google (even the advanced searches as advised in a different thread)...somebody help please...

I'm just want to make sure that my IT illerate users have to tick a checkbox before they can view the next record with a message box appearing to ask them to tick it if they haven't.

I've seen a few threads on much more complex scenarios but have failed to plagiarise anything, it must be pretty basic to do right?!?
 
In the Form's Before Update event you can put:
Code:
If Me.YourCheckBoxNameHere <> True Then
   If MsgBox("You need to check the checkbox to move on" & vbCrLF & 
              "Do you wish to continue with this record?, vbQuestion + VbYesNo, "Record Incomplete") = vbNo Then
       Cancel = True
       Me.Undo
   Else
       Cancel = True
   End If
End If
 
Thanks, this is great I've even manage to tweak it a bit to dumb it down even further for my IT illiterate users...I'm learning!!

If Me.Review_Completed <> True Then
If MsgBox("Please tick the Review Completed Box before proceeding to your next asset", vbOKOnly) Then
Cancel = True
Me.Undo
Else
Cancel = True
End If
End If

One problem though is that this form is actually populating empty fields in a number of records that already exist; as a result, the prompt only appears after you've ticked the checkbox for the first record in the sequence and does not appear thereafter.

I hope this makes sense, any ideas? I'm assuming that the code should slot in somewhere other than beforeupdate but not sure where...I've tried a few but no joy yet.
 
the prompt only appears after you've ticked the checkbox for the first record in the sequence and does not appear thereafter.
Sounds like your checkbox isn't bound to a field.
 
The control source is linked to a field in a table though; is that not sufficient to bind it?

Also, I redid my checkbox per help which stated that you should drag your field onto the form (not click) after clicking on the checkbox button on the toolbar.
 
Dragging the field onto the form should do it. By default, Access gives controls the same name as the underlying field and this can cause problems. Most programmers use a convention of prefixes to rename the controls so that, for example, the field ReviewCompleted would be bound to the control chkReviewCompleted. Perhaps this is an issue in your case.
 
I still can't get this right...the checkbox is bound and the MsgBox does prompt the user to tick the review completed box; however, the problem is,

The prompt only appears if an amendment has been made to the form and the user then attempts to move onto the next record or Exit.

The prompt does not appear if there are no amendments made to the form.

To clarify, I want the user to tick the checkbox before moving onto the next record even if they have not made any amendments.

This is my last role of the dice, by the way, as I'm googled out!!!
 
I don't understand. The check box will already be ticked if the record has been amended in the past. Can you explain the business context of what you are trying to do.
 
Hi Neil, thanks for your quick response.

I want some people to review some data in a table. If they're happy with it, I want them to tick a checkbox to confirm that they have reviewed it.

This means that some users will not amend any fields in the table except for the checkbox.

However, the prompt will not show if the user scrolls view a record and does not tick the checkbox.

Thanks
 
Yes I understand that bit. But what if the record has been reviewed by someone else and they have already ticked the box? When I look at the record, the box is ticked so I can't tick it again. Do you want to untick the box if somebody new looks at the form? What if I'm just scrolling through some records, and not actually reviewing them? Do you still want me to tick the box?
 
The intention is that only the users will review the records, so anyone scrolling through will in effect be reviewing the records and will need to tick the review completed checkbox. In theory, once the checkbox has been ticked it should not be able to be unticked but I'm not sure if this is possible.

I was going to write some queries to pick up any records which had not been reviewed and to list any amendments that had been made.

I'm using parameter values so that users can only review record for their cost centre. Other users will not be able to review records which do not relate to their cost code.
 
I think you need to change the event that you use. I suspect you need both the OnCurrent event and the Close event.
 
Thanks Neil, this seems to partly do the trick; the only down side is it asks for the checkbox to be ticked prior to the record being opened but it does mean that the user does have to tick the box to say they are about to review the record which is ultimately what I was trying to do.
 

Users who are viewing this thread

Back
Top Bottom