Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Registration Seminar Lessons    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Whats wrong with logic
Jeff Shepard 
      
15 months ago
DetailsPrivate Sub Form_Open(Cancel As Integer)

    Dim S As String
    Dim D As Date
    
    S = GetSetting("Win64Set32", "SectionAPPXa4b", "IsReg", "TRUE")
    If S = "TRUE" Then
        MsgBox "Initialization Of PassBase is complete."
        DoCmd.OpenForm "LogonF"
    Else
    If S = GetSetting("Win64Set32", "SectionAPPXa4b", "IsReg", "FALSE") Then
    MsgBox " PassBase is not Registered.  Call Customer Service xxx-xxx-xxxx"
    End If
    End If
    MsgBox " PassBase is now shutting down"
        DoCmd.Quit


When PassBase starts up the above code runs.  I have this in a Logon form.  I ran it several times and it gives the message that PassBase has initialized.  It goes to PassBase is shutting down.  

I just checked The True condition exists and it should goto the logon form.  
MY QUESTION is:

So what can I change to get it to check the condition of "TRUE" then go to logon form otherwise if "False" send message that PassBase is shutting down.

Final Question:
am I better off having this execute from a Autoexec file or keep it in the Logon form?

I looked for an Autoexec file to execute from option, Current, Database form.
It does not exist.

Thank you for your help, Jeff
Kevin Robertson  @Reply  
          
15 months ago
MsgBox " PassBase is now shutting down" is outside of the If  block so is going to run whatever value is returned.
Jeff Shepard OP  @Reply  
      
15 months ago
Kevin,  You were right on the mark.  I tested both conditions.  You are batting 1000.  Thank you Kevin.
Jeff Shepard OP  @Reply  
      
15 months ago
Since it now works.  I will close this thread.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Registration Seminar Lessons.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/30/2026 4:08:07 AM. PLT: 0s