Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 107,420 VB Programmers for FREE! Ask your question and get quick answers from experts. There are 1,145 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Access Splash Screen start up error

 
Reply to this topicStart new topic

Access Splash Screen start up error, Access Splash Screen start up error with VB Code

rtrgrl78
post 23 Jun, 2008 - 12:43 PM
Post #1


New D.I.C Head

*
Joined: 23 Jun, 2008
Posts: 2

Hello,

I'm experiencing a slight difficulty with a Splash Screen I am trying to create for

Microsoft Access, when it starts up, when you click on Lable Close I get an error message

reading 'Compile error: User-defined type not defined', this appears at the prompt in the

code I've highlighted in Bold. Any help with this is very much received, I've

gotten the code from an internet site that helps you design a Splash Screen. Many

Thanks.

The Code:
CODE

Option Compare Database
Option Explicit

Private Sub chkShowHide_BeforeUpdate(Cancel As Integer)

End Sub

Private Sub Form_Current()

End Sub

Private Sub lblClose_Click()
    On Error GoTo Err_lblClose_Click

    ' Close the splash screen &
    ' Open the main database form, frmClients

    DoCmd.Close
    DoCmd.OpenForm "frmClients"

Exit_lblClose_Click:
    Exit Sub

Err_lblClose_Click:
    MsgBox Err.Description
    Resume Exit_lblClose_Click

End Sub

Private Sub Form_Open(Cancel As Integer)

On Error GoTo FormOpen_Err
    If (CurrentDb().Properties("StartupForm") = "frmSplashScreen" Or _
        CurrentDb().Properties("StartupForm") = "Form.frmSplashScreen") Then
        Forms!frmSplashScreen!chkHideSplash = False
     Else
        Forms!frmSplashScreen!chkShowHide = True
    End If
FormOpen_Exit:
    Exit Sub
    
FormOpen_Err:
    If Err = 3270 Then
        Forms!frmSplashScreen!chkShowHide = True
        Resume FormOpen_Exit
    End If
    
End Sub

Private Sub Form_Close()

On Error GoTo Form_Close_Err
    If Forms!frmSplashScreen!chkShowHide Then
        CurrentDb().Properties("StartupForm") = "frmClients"
    Else
        CurrentDb().Properties("StartupForm") = "frmSplashScreen"
    End If
Exit Sub

Form_Close_Err:
    If Err = 3270 Then
        Dim db As DAO.Database
        Dim prop As DAO.Property
        Set db = CurrentDb()
        Set prop = db.CreateProperty("StartupForm", dbText, "frmSplashScreen")
        db.Properties.Append prop
        Resume Next
    End If
    
End Sub
User is offlineProfile CardPM

Go to the top of the page


jayman9
post 23 Jun, 2008 - 12:46 PM
Post #2


Student of Life

Group Icon
Joined: 26 Dec, 2005
Posts: 6,289



Thanked 21 times

Dream Kudos: 500

Expert In: C#, VB.NET, Java

My Contributions


Moved to Visual Basic. Please use code.gif tags when posting code.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/28/08 08:07PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month