Re: Makeing at least one record required! Re-post

From: James (James_at_discussions.microsoft.com)
Date: 01/02/05


Date: Sun, 2 Jan 2005 10:09:01 -0800

First, thank you for all of your help!
So how would you count the rows?

I tried this code but it doesn't work correctly. No matter how many are
checked it pulls up the msgbox that show you must have at least 1 admin. I
think it's in the DSum.

"Jeff Boyce" wrote:

> James
>
> Are you saying that you want to prevent any records until an administrator
> is in the database? Uhmmm, how does the administrator get in there, then?
> <g>
>
> If you wrote some code to count the number of rows with the Admin checked,
> you could use this to confirm the presence of at least one...
>
> --
> Good luck
>
> Jeff Boyce
> <Access MVP>
>
> "James" <James@discussions.microsoft.com> wrote in message
> news:252D3B7D-7473-453F-AEE6-D17CB5C94FF4@microsoft.com...
> > I have an employee information form that has a yes/no checkbox for the
> > employee to be an administrator. There must always be at least 1
> > administrator or they will not be able to login to the options
> section(which
> > is where the employee form link is located). What would you put in the
> > beforeupdate section to not allow a user to save a record unless there is
> at
> > least 1 admin?
> >
> > thanx
> >
> > Reply:
> > James,
> >
> > This could not happen with a new employee record, right? This could
> > only happen if you are editing the record for an existing employee who
> > happens to be the only currently assigned Admin, and you remove the
> > admin status from this person. Do I understand correctly?
> >
> > Response:
> > Correct. The database is started with an employee record called admin
> with
> > the admin check box = true. I want them to be able to delete the admin
> > record but only if one or more records has the admin check box = true.
> >
> >
> >
>
>



Relevant Pages

  • Re: Makeing at least one record required! Re-post
    ... Are you saying that you want to prevent any records until an administrator ... If you wrote some code to count the number of rows with the Admin checked, ... > employee to be an administrator. ... The database is started with an employee record called admin ...
    (microsoft.public.access.formscoding)
  • Re: Security
    ... > owner and administrator, then took the Admin account and assigned it ... > Can anybody now access my database without the workgroupfile that was ... It sounds OK, but if you want to test, rejoin your system.mdw workgroup ...
    (microsoft.public.access.security)
  • RE: Creating a My Site Template for all sites
    ... simply stored in the personalization database. ... Changes to the site definition will not appear for that user. ... To make changes for all users, the administrator can change the My Site site ... So if a user has unghosted his My Site before the admin changes the site ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Making at least one record required.
    ... The database is started with an employee record called admin with ... the admin check box = true. ... > This could not happen with a new employee record, ... > Steve Schapel, Microsoft Access MVP ...
    (microsoft.public.access.formscoding)
  • Re: Alternative to Windows Explorer
    ... One drawback if you use that "runas" approach then you really won't know ... Administrator versus their using their actual account. ... admin, a variation of their normal account. ... > pen testing experience in our state of the art hacking lab. ...
    (Security-Basics)