MS ACCESS check box on form

dhsdhs

Member
Joined
Mar 6, 2003
Messages
6
Location
Maine
I have a form(warning) which appears when a record is changed on another form. This form has a check box to allow the user to turn the form off so it wont appear the next time a record is changed.
This is the AfterUpdate code for the check box. Problem is, you can check the box, but the next time a record is changed the box appears again, checked box and all. Whats wrong?
Code:
Private Sub Check5_AfterUpdate()
On Error GoTo HideStartupForm_Err

If Me.ActiveControl = True Then
    CurrentDb.Properties("ShowPopUp") = "Dont Show"
Else
    CurrentDb.Properties("ShowPopUp") = "Show"
End If
    
DoCmd.Close
Exit Sub
        
HideStartupForm_Err:
    Const conPropertyNotFound = 3270
    If Err = conPropertyNotFound Then
        Dim db As DAO.Database
        Dim prop As DAO.Property
        Set db = CurrentDb
        Set prop = db.CreateProperty("ShowPopUp", dbText, "Show")
        db.Properties.Append prop
        Resume Next
    End If

End Sub

Private Sub Form_Load()
If CurrentDb.Properties("ShowPopUp") = "Dont Show" Then
    Me.Check5 = True
Else
    Me.Check5 = False
End If
End Sub

Private Sub Form_Timer()
    DoCmd.Close
End Sub
 
Im not sure where youre NOT showing the form...? It sounds like your checkbox is one of those "Dont show this message again" things, but I need to see more code to understand whats wrong. Maybe show the code from the opening form, from the form thats the popup and any relevent events, all commented so I know what is where...

-Nerseus

<edited to correct my own name mis-spelling :)>
 
Back
Top