exclude inactive accounts during accounts lookup

  • Follow


When I go to any distribution screen and click on the account look up, the 
accounts window will show up and it lists all accounts including those that 
are inactive. I want to be able to exclude these accounts on the list. I know 
I can always go in and enter a restriction but is there a permanent fix to 
that? 

thanks!
0
Reply Utf 3/17/2010 5:30:05 PM

Rheiner,

I found two ways to overcome this, using VBA:
1.  Create an Advanced Lookup on Accounts, using the Field "Active"
add the Account Lookup Window to VBA, under "Additional Sorts" select the 
"By Active" sort option.  Add the Active Field to VBA.
Add this code:
Private Sub Grid_BeforeLinePopulate(RejectLine As Boolean)
If ASILUAddnlSort.Value = "No" Then
RejectLine = True
End If
End Sub
This requires that each time the user opens the Lookup window they need to 
select the additional Sort Button.

2. Modify the Window and add the "Active" Field to the Grid Area.  Add the 
lookup Window and the Active field to VBA.
Add this code:
Private Sub Grid_BeforeLinePopulate(RejectLine As Boolean)
If Active.Value = 0 Then
    RejectLine = True
End If
End Sub

This option the User doesn't need to select the additional sort option.

Cheers,

Mick




"Rheiner" wrote:

> When I go to any distribution screen and click on the account look up, the 
> accounts window will show up and it lists all accounts including those that 
> are inactive. I want to be able to exclude these accounts on the list. I know 
> I can always go in and enter a restriction but is there a permanent fix to 
> that? 
> 
> thanks!
0
Reply myfibamember (2) 3/17/2010 11:21:01 PM


thanks for the response Mick. 

i'll try the second one.


Regards,

Rheiner


"Mick Egan" wrote:

> Rheiner,
> 
> I found two ways to overcome this, using VBA:
> 1.  Create an Advanced Lookup on Accounts, using the Field "Active"
> add the Account Lookup Window to VBA, under "Additional Sorts" select the 
> "By Active" sort option.  Add the Active Field to VBA.
> Add this code:
> Private Sub Grid_BeforeLinePopulate(RejectLine As Boolean)
> If ASILUAddnlSort.Value = "No" Then
> RejectLine = True
> End If
> End Sub
> This requires that each time the user opens the Lookup window they need to 
> select the additional Sort Button.
> 
> 2. Modify the Window and add the "Active" Field to the Grid Area.  Add the 
> lookup Window and the Active field to VBA.
> Add this code:
> Private Sub Grid_BeforeLinePopulate(RejectLine As Boolean)
> If Active.Value = 0 Then
>     RejectLine = True
> End If
> End Sub
> 
> This option the User doesn't need to select the additional sort option.
> 
> Cheers,
> 
> Mick
> 
> 
> 
> 
> "Rheiner" wrote:
> 
> > When I go to any distribution screen and click on the account look up, the 
> > accounts window will show up and it lists all accounts including those that 
> > are inactive. I want to be able to exclude these accounts on the list. I know 
> > I can always go in and enter a restriction but is there a permanent fix to 
> > that? 
> > 
> > thanks!
0
Reply Utf 3/17/2010 11:45:01 PM

Another option will be to upgrade to version 2010.  
-- 
Richard L. Whaley
Author / Consultant / MVP 2006-2008
Documentation for Software Users

Get our Free Tips and Tricks Newsletter and check out our books at 
http://www.AccoladePublications.com



"Rheiner" wrote:

> thanks for the response Mick. 
> 
> i'll try the second one.
> 
> 
> Regards,
> 
> Rheiner
> 
> 
> "Mick Egan" wrote:
> 
> > Rheiner,
> > 
> > I found two ways to overcome this, using VBA:
> > 1.  Create an Advanced Lookup on Accounts, using the Field "Active"
> > add the Account Lookup Window to VBA, under "Additional Sorts" select the 
> > "By Active" sort option.  Add the Active Field to VBA.
> > Add this code:
> > Private Sub Grid_BeforeLinePopulate(RejectLine As Boolean)
> > If ASILUAddnlSort.Value = "No" Then
> > RejectLine = True
> > End If
> > End Sub
> > This requires that each time the user opens the Lookup window they need to 
> > select the additional Sort Button.
> > 
> > 2. Modify the Window and add the "Active" Field to the Grid Area.  Add the 
> > lookup Window and the Active field to VBA.
> > Add this code:
> > Private Sub Grid_BeforeLinePopulate(RejectLine As Boolean)
> > If Active.Value = 0 Then
> >     RejectLine = True
> > End If
> > End Sub
> > 
> > This option the User doesn't need to select the additional sort option.
> > 
> > Cheers,
> > 
> > Mick
> > 
> > 
> > 
> > 
> > "Rheiner" wrote:
> > 
> > > When I go to any distribution screen and click on the account look up, the 
> > > accounts window will show up and it lists all accounts including those that 
> > > are inactive. I want to be able to exclude these accounts on the list. I know 
> > > I can always go in and enter a restriction but is there a permanent fix to 
> > > that? 
> > > 
> > > thanks!
0
Reply Utf 3/18/2010 4:07:02 PM

3 Replies
459 Views

(page loaded in 0.092 seconds)


Reply: