Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA - change Vendor Lookup

Status
Not open for further replies.

dbigelow

Technical User
Feb 5, 2004
41
US
I have never used the VBA Modifier function:

My client would like to change the default sort setting in the Vendor lookup window from Vendor ID to Vendor Name. I have changed using the additional sorts feature but it always resets after you close the window. I suspect the code is run every time you open the lookup window thus reseting the sort. She would also like some custom Payment terms which you are not able to create with the base options in GP

Thank you

Dan Bigelow
 
Does the customer have Modifier/VBA registered?

It is fairly easier to click on the Vendor Name button using the AfterWindowOpen event.

Changing Payment terms would probably need a Dexterity Customisation.

David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer
MBS Support - Asia Pacific

Microsoft Business Solutions

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties,
and confers no rights.
 
well - I am close - I added the current window and the look up glass and opened the VBA editor but I can't navigate to the code???? how do you see the code to change it????

Thank you,
 
Ok, I have it working for you. Because the window opens and then is refreshed, the Window_AfterOpen event fires too early. So the following uses the focus event to handle the timing issue.

Add the lookup window to VBA, add the fields Vendor Name button and the Find string to VBA and use the code below:


Option Explicit
Dim OpenFlag As Boolean

Private Sub ASILUFindString_AfterGotFocus()
If OpenFlag Then
OpenFlag = False
VendorName = 1
End If
End Sub

Private Sub Window_AfterOpen()
OpenFlag = True
End Sub


Have fun.

David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer
MBS Support - Asia Pacific

Microsoft Business Solutions

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties,
and confers no rights.
 
Hi,

Another option you could look at is SmartFill from Rockton Software. This allows you to do the lookup almost anyway you choose (even Vendor Phone Number or Contact). And it would work with Accounts, Customers, Employee IDs,etc. The cost of the software is probably about the same as the cost to do your VBA customization on one window. It works with dexterity based 3rd party products and customizations. There is a flash demo at Take a look and if you are interested let them know you found out about it here.

tcrm2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top