Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 won't 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. What's wrong?

Private Sub Check5_AfterUpdate()
On Error GoTo HideStartupForm_Err

If Me.ActiveControl = True Then
   CurrentDb.Properties("ShowPopUp") = "Don't 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") = "Don't Show" Then
   Me.Check5 = True
Else
   Me.Check5 = False
End If
End Sub

Private Sub Form_Timer()
   DoCmd.Close
End Sub

  • *Experts*
Posted

I'm not sure where you're NOT showing the form...? It sounds like your checkbox is one of those "Don't show this message again" things, but I need to see more code to understand what's wrong. Maybe show the code from the opening form, from the form that's the popup and any relevent events, all commented so I know what is where...

 

-Nerseus

 

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

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...