Restricting going to next account on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that I am builing and I do not want the user to go on to the
next account without filling out the account properly. I have the close
button for the form removed and the navigation buttons are removed. I have a
button that the user can click and it will let them go on if it is correct.

My Question is the user can still user the tab key, page down, file-close or
the mousewheel to go the next account. Is there anyway of restricting these
actions?

Question 2,

I have done this in the past, but I cannot remember how to do this, how do I
restrict the user from seeing anything in design view?
 
You're probably going about this problem wrongly.

"Data validation" is a common requirement in a database form. But you
don't do that by putting your checking code on a command button.
Instead, you put your checking code in the appropriate /event
procedures/ withinin the form.

For example, to check the value that the user enters into a field, you
use the fields' BeforeUpdate event. To check that the user /has
entered/. a field, you can use the form's BeforeUpdate event, and so
on.

Then,. the approprate events will fire whenever the user tries to leave
that record without saving it. If any of those "event based" checks
fail, Access won't move off that record; it will stay on that record
until the user fixes the problem, or erases the record. If the event
based checks succeed, Access will automatcally save the record, and let
the user clos the form, or start on a new record, or whatever.

You'll proably get better help, if you say what you're trying to
achieve from an "end user" viewpoint. What should happen, or not
happen, from the end user's viewpoint? If you can tell us that, we can
tell you how to do it.

HTH,
TC (MVP Access)
http://tc2.atspace.com
 
What I am trying to do is, there is several check boxes on the form, if the
user checks a certain box (which the form will not let the other boxes be
checked until this box is checked), and does not check any of the other
boxes, I need the form not to go on until one of these boxes are checked.

This is for a compliance type job, the user has to indicate that they found
the account and either nothing is wrong with this account or check on of the
boxes indicating what is wrong with the account.
 
Ok, we're nearly there, but not yet.

You have a main checkbox, let's call it chkA, which says if there is
something wrong with the account.

And (say) three others, chkX, chkY and chkZ, which are individual
reasons what is wrong with the account.

You want to ensure that /if/ the user checks chkA, they must /also/
check one of the other three boxes.

Right?

If so, two questions:

(1) Can they check *more than one* of chkA, chkB and chkC - or only
one?

(2) Can they check those boxes even when they *have not* checked chkA?

(3) Do you actually need chkA? Couldn't you say: "If the user has
checked the other 3 boxes, the accound is not ok. If they /haven't/, it
/is/".

TC (MVP Access)
http://tc2.atspace.com
 
Back
Top