Listbox Troubles (1 Viewer)

mumbles10

Registered User.
Local time
Today, 09:16
Joined
Feb 18, 2011
Messages
66


Thanks Bob... Here is the funny thing... I changed the join on the qry and now the form updates... however I still get the Runtime 2450 error saying it can't find the form. It updates the listbox okay but the error still appears...

Any thoughts?
 

Attachments

  • Listbox Working.mdb
    480 KB · Views: 79

boblarson

Smeghead
Local time
Today, 06:16
Joined
Jan 12, 2001
Messages
32,059
The error happens if you don't have the frmSysEnt form open at the time you add a new entitlement. To solve that just change your frmEntitlement's After Update code to this:
Code:
Private Sub Form_AfterUpdate()
    [COLOR=red]If CurrentProject.AllForms("frmSysEnt").IsLoaded Then
[/COLOR]        Forms!frmSysEnt.lboAllEnt.Requery
        Forms!frmSysEnt.lboCurrentEnt.Requery
    [COLOR=red]End If[/COLOR]
End Sub
 

mumbles10

Registered User.
Local time
Today, 09:16
Joined
Feb 18, 2011
Messages
66
The error happens if you don't have the frmSysEnt form open at the time you add a new entitlement. To solve that just change your frmEntitlement's After Update code to this:
Code:
Private Sub Form_AfterUpdate()
    [COLOR=red]If CurrentProject.AllForms("frmSysEnt").IsLoaded Then[/COLOR]
        Forms!frmSysEnt.lboAllEnt.Requery
        Forms!frmSysEnt.lboCurrentEnt.Requery
    [COLOR=red]End If[/COLOR]
End Sub


Great, thanks Bob.
 

Users who are viewing this thread

Top Bottom