Form only when needed

tbl_members contains a list of member information, including a Yes/No field if they are current in their training.  (field name Current)

Once a member signs in, I have a macro that runs and brings up a form to indicate successful login.  (on update of the id field)

However, I also want to check to see if tbl_members shows they are not current ([tbl_members].[current]=false)
If they are, I want to put up a form that indicates such, that also plays a wave file or at a minimum beeps several times.

If they are current, the form is not needed.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You can check your table like this:

If Nz(DLookup("SomeIDField", "tbl_Members", "MemberID=" & SomeMemberID & " AND Current=False"),0) = 0 Then
  DoCmd.OpenForm "YourFormName"
End If

Of course, you'd have to modify the DLookup to use the correct Fields and such. The "MemberID" field, for example, would be the field in tbl_Members that would be used to identify the person who just logged in.

You can force the machine to beep by issuing the "Beep" call:

If Nz(DLookup("SomeIDField", "tbl_Members", "MemberID=" & SomeMemberID & " AND Current=False"),0) = 0 Then
  DoCmd.OpenForm "YourFormName"
End If

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jeffrey CoachmanMIS LiasonCommented:
Whats the need for the sound?
In most cases the sound may become annoying after a while.
I typically try to employ a "visual" cue, like conditional formatting (but not anything flashing)

Also remember that if the user mutes the speakers, it won't be heard.
For example, a user may turn off the volume while watching a youtube video, (or muting an annoying self-playing ad) and not remember to turn it back on/up.

In any event, I am not sure you will get two (or more) distinct beeps unless you set some type of wait or delay in our code...

This popular code (to play a wav file) has been around for a while.

Hope this helps as well...

TIgerVAuthor Commented:
The sound is to let me know across the room that people are not current.  If the training is not current, they must complete a training module prior to attending the meeting.
Jeffrey CoachmanMIS LiasonCommented:
The sound is to let me know across the room that people are not current.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.