Auto Fill Blank Title 93867

Good Point! :-)

Sometimes the answer stares you in the face.

I have it working so I dont get the error.

Thanks guys for your help - I'm sure I will be in touch with more queries soon.




________________________________
From: bw2868bond <bwalker@...>
To: vantage@yahoogroups.com
Sent: Tue, 28 September, 2010 14:23:46
Subject: [Vantage] Re: Auto Fill

Â
Isn't the 'description' field actually PartDescription ?

--- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@...> wrote:
>
> I have tried changing the + to & and also bw2868bond's suggestion of too many
> double quotes and I am still getting the error when testing the SO Entery
> "Unhandled exception has occurred ...
>
> "Invalid query@ where Company = 'ELEC01' and (Part.PartNum MATCHES('tce*') OR
> Part.Description MATCHES('tce*'))."
>
> Does anyone know why?
>
>
>
>
> ________________________________
> From: bw2868bond <bwalker@...>
> To: vantage@yahoogroups.com
> Sent: Tue, 28 September, 2010 14:04:53
> Subject: [Vantage] Re: Auto Fill
>
> ÂÂ
> too many double quotes?
>
> Dim WhereClause as String = "Part.PartNum MATCHES('" + epiUltraComboC2.Text &
> "*') OR Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
>
> --- In vantage@yahoogroups.com, Jose Gomez <jose@> wrote:
> >
> > Replace + signs with & for VB
> >
> > Sincerely
> > Jose C Gomez
> >
> > http://www.josecgomez.com
> >
> >
> > On Tue, Sep 28, 2010 at 8:06 AM, Jose Gomez <jose@> wrote:
> >
> > > Its because you are using VB and I gave you code in C#, it needs to be
> > > translated to VB
> > >
> > > Dim WhereClause as String = "Part.PartNum MATCHES('" +
epiUltraComboC2.Text
> > > & "*')"
> > >
> > > OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
> > > Dim lst as DataSet
> > > = read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")
> > >
> > >
> > >
> > >
> > >
> > > Sincerely
> > > Jose C Gomez
> > >
> > > http://www.josecgomez.com
> > >
> > >
> > > On Tue, Sep 28, 2010 at 7:52 AM, Chris Thompson <chriselectrix@>wrote:
> > >
> > >>
> > >>
> > >> Hi Jose
> > >>
> > >> This is what I have ...
> > >>
> > >>
> > >> '//**************************************************
> > >> '// Custom VB.NET code for SalesOrderForm
> > >> '// Created: 27/09/2010 13:15:44
> > >> '//**************************************************
> > >> Imports System
> > >> Imports System.Data
> > >> Imports System.Diagnostics
> > >> Imports System.Windows.Forms
> > >> Imports System.ComponentModel
> > >> Imports Microsoft.VisualBasic
> > >> Imports Epicor.Mfg.Lib
> > >> Imports Epicor.Mfg.UI
> > >> Imports Epicor.Mfg.UI.FrameWork
> > >> Imports Epicor.Mfg.UI.ExtendedProps
> > >> Imports Epicor.Mfg.UI.FormFunctions
> > >> Imports Epicor.Mfg.UI.Customization
> > >> Imports Epicor.Mfg.UI.Adapters
> > >> Imports Epicor.Mfg.UI.Searches
> > >> Imports Epicor.Mfg.BO
> > >>
> > >> Module Script
> > >>
> > >> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added
> > >> Module
> > >> Level Variables' Comments! **
> > >>
> > >> '// Begin Wizard Added Module Level Variables **
> > >> '// End Wizard Added Module Level Variables **
> > >>
> > >> '// Add Custom Module Level Variables Here **
> > >> Private read as BOReader = nothing
> > >> '//Private rdr As Epicor.Mfg.Lib.BOReader
> > >>
> > >> Sub InitializeCustomCode()
> > >> read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> > >> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
> > >> Variable
> > >> Initialization' lines **
> > >>
> > >> '// Begin Wizard Added Variable Initialization
> > >> '// End Wizard Added Variable Initialization
> > >> '// Begin Wizard Added Custom Method Calls
> > >> AddHandler epiUltraComboC2.KeyPress, AddressOf
> > >> Script.epiUltraComboC2_KeyPress
> > >> AddHandler epiUltraComboC2.KeyUp, AddressOf Script.epiUltraComboC2_KeyUp
> > >> '// End Wizard Added Custom Method Calls
> > >>
> > >> End Sub
> > >>
> > >> Sub DestroyCustomCode()
> > >>
> > >> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
> > >> Object
> > >> Disposal' lines **
> > >>
> > >> '// Begin Wizard Added Object Disposal
> > >> RemoveHandler epiUltraComboC2.KeyPress, AddressOf
> > >> Script.epiUltraComboC2_KeyPress
> > >> RemoveHandler epiUltraComboC2.KeyUp, AddressOf
> > >> Script.epiUltraComboC2_KeyUp
> > >> '// End Wizard Added Object Disposal
> > >> '// Begin Custom Code Disposal
> > >> '// End Custom Code Disposal
> > >> End Sub
> > >> Private Sub PartSearch()
> > >> '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
> > >> +
> > >> epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
> > >> '// String whereClause = ("Part.PartNum MATCHES('" +
> > >> epiUltraComboC2.Text &
> > >> "*') OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*'))
> > >> '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
> > >> +
> > >> epiUltraComboC2.Text & "*')" OR "Part.Description MATCHES('" +
> > >> epiUltraComboC2.Text & "*')", "PartNum,Description,ClassID,UnitPrice")
> > >>
> > >>
> > >> String WhereClause = "Part.PartNum MATCHES('" + epiUltraComboC2.Text &
> > >> "*')"
> > >> OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
> > >> DataSet lst =
> > >> read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")
> > >>
> > >>
> > >> epiUltraComboC2.DataSource = lst
> > >> epiUltraComboC2.ValueMember = "PartNum"
> > >> epiUltraComboC2.DisplayMember = "PartNum"
> > >> End Sub
> > >> Private Sub epiUltraComboC2_KeyPress(ByVal sender As Object, ByVal args
> > >> As
> > >> System.Windows.Forms.KeyPressEventArgs)
> > >> ' ** Place Event Handling Code Here **
> > >> If EpiUltraComboC2.Text.Length > 2 Then PartSearch
> > >> End Sub
> > >>
> > >> Private Sub epiUltraComboC2_KeyUp(ByVal sender As Object, ByVal args As
> > >> System.Windows.Forms.KeyEventArgs)
> > >> ' ** Place Event Handling Code Here **
> > >> If EpiUltraComboC2.Text.Length > 2 Then PartSearch
> > >> End Sub
> > >>
> > >> End Module
> > >>
> > >> And this is the compile errors I am getting ...
> > >>
> > >> Compiling Custom Code ...
> > >>
> > >> ----------errors------------
> > >> Error: BC30109 - line 74 (415) - 'String' is a class type and cannot be
> > >> used as
> > >> an expression.
> > >> Error: BC30287 - line 74 (415) - '.' expected.
> > >> Error: BC30108 - line 75 (416) - 'DataSet' is a type and cannot be used
> > >> as an
> > >> expression.
> > >> Error: BC30800 - line 75 (416) - Method arguments must be enclosed in
> > >> parentheses.
> > >> Error: BC30451 - line 75 (416) - Name 'lst' is not declared.
> > >> Error: BC30451 - line 75 (416) - Name 'whereClause' is not declared.
> > >> Error: BC30451 - line 77 (418) - Name 'lst' is not declared.
> > >> ** Compile Failed. **
> > >>
> > >> ________________________________
> > >> From: Jose Gomez <jose@ <jose%40josecgomez.com>>
> > >> To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
> > >>
> > >> Sent: Mon, 27 September, 2010 16:54:55
> > >> Subject: Re: [Vantage] Re: Auto Fill
> > >>
> > >> Just replace the where Clause with something like shown below. For Using
> > >> Description
> > >>
> > >> String whereClause ="Part.PartNum MATCHES('"+epiUltraComboC1.Text+"*') OR
> > >> Part.PartDescription MATCHES ('"+epiUltraComboC1.Text+"*')";
> > >>
> > >> DataSet lst = read.GetList("Part",whereClause
> > >> ,"PartNum,PartDescription,ClassID,UnitPrice");
> > >>
> > >> To show only Manufactured parts just modify the query again to looking at
> > >> whatever field that tells you its manufactured.. how do you know when a
> > >> part
> > >> is manufactured???
> > >> If you tell me what you look at , I can give you the right query. However
> > >> keep in mind that if the field is outside of th Part table then you are
> > >> pretty much out of luck
> > >>
> > >> Sincerely
> > >> Jose C Gomez
> > >>
> > >> http://www.josecgomez.com
> > >>
> > >> On Mon, Sep 27, 2010 at 11:37 AM, Jose Gomez
> ><jose@<jose%40josecgomez.com>>
> > >> wrote:
> > >>
> > >> > If you look in the original thread? (Which BTW why did you all create
> > >> > another one??) you shoulkd see the code for using Description, you can
> > >> also
> > >> > modify the query to include only manufactured parts the same way.
> > >> > Sincerely
> > >> > Jose C Gomez
> > >> >
> > >> > http://www.josecgomez.com
> > >> >
> > >> >
> > >> >
> > >> > On Mon, Sep 27, 2010 at 11:11 AM, Chris Thompson
> > >> ><chriselectrix@ <chriselectrix%40ymail.com>>wrote:
> > >> >
> > >> >>
> > >> >>
> > >> >> Hi
> > >> >>
> > >> >> Ive finally got it working.
> > >> >>
> > >> >> Do you know if there is any way that it can be customised even further
> > >> to
> > >> >> only
> > >> >> include 'manufactured' parts in the available parts that can be
> > >> selected,
> > >> >> rather
> > >> >> than displaying all parts?
> > >> >>
> > >> >> Also what do I need to do to my code to allow it to search on
> > >> Description
> > >> >> as
> > >> >> well as Part Number?
> > >> >>
> > >> >> I can see this code coming in useful all over!!
> > >> >>
> > >> >> Thanks,
> > >> >>
> > >> >> CHRIS
> > >> >>
> > >> >>
> > >> >> ________________________________
> > >> >> From: Dan Sirow <dansirow@ <dansirow%40iccparts.com><dansirow%
> > >> 40iccparts.com>>
> > >> >> To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> > >> 40yahoogroups.com>
> > >>
> > >> >>
> > >> >> Sent: Mon, 27 September, 2010 15:49:11
> > >> >> Subject: [Vantage] Re: Auto Fill
> > >> >>
> > >> >>
> > >> >>
> > >> >> Use the wizards to create the event code.
> > >> >>
> > >> >> Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
> > >> >> Custom
> > >> >> Control is epiUltraCombo2(matching your code), Available Controls pick
> > >> >> both Key
> > >> >> Press and Key UP, then update all event code. In the event code that
is
> > >> >> created,
> > >> >> enter code like:
> > >> >> If EpiUltraComboC2.Text.Length > 3 Then PartSearch
> > >> >>
> > >> >> This was the 1st time I used the event wizard, really cool stuff!
> > >> >>
> > >> >> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> > >> 40yahoogroups.com>, Chris
> > >>
> > >> >> Thompson <chriselectrix@> wrote:
> > >> >> >
> > >> >> > This is what I have so far - what else do I need to do to get it to
> > >> >> work??
> > >> >> >
> > >> >> > '//**************************************************
> > >> >> > '// Custom VB.NET code for SalesOrderForm
> > >> >> > '// Created: 27/09/2010 13:15:44
> > >> >> > '//**************************************************
> > >> >> > Imports System
> > >> >> > Imports System.Data
> > >> >> > Imports System.Diagnostics
> > >> >> > Imports System.Windows.Forms
> > >> >> > Imports System.ComponentModel
> > >> >> > Imports Microsoft.VisualBasic
> > >> >> > Imports Epicor.Mfg.Lib
> > >> >> > Imports Epicor.Mfg.UI
> > >> >> > Imports Epicor.Mfg.UI.FrameWork
> > >> >> > Imports Epicor.Mfg.UI.ExtendedProps
> > >> >> > Imports Epicor.Mfg.UI.FormFunctions
> > >> >> > Imports Epicor.Mfg.UI.Customization
> > >> >> > Imports Epicor.Mfg.UI.Adapters
> > >> >> > Imports Epicor.Mfg.UI.Searches
> > >> >> > Imports Epicor.Mfg.BO
> > >> >> >
> > >> >> > Module Script
> > >> >> >
> > >> >> > Â '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard
> > >> Added
> > >> >> Module
> > >> >>
> > >> >> > Level Variables' Comments! **
> > >> >> >
> > >> >> > Â '// Begin Wizard Added Module Level Variables **
> > >> >> > Â '// End Wizard Added Module Level Variables **
> > >> >> >
> > >> >> > Â '// Add Custom Module Level Variables Here **
> > >> >> > Â Â Â Private read as BOReader = nothing
> > >> >> > Â Â Â '//Private rdr As Epicor.Mfg.Lib.BOReader
> > >> >> >
> > >> >> > Â Sub InitializeCustomCode()
> > >> >> > Â Â Â read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> > >> >> > Â Â '// ** Wizard Insert Location - Do not delete 'Begin/End
Wizard
> > >> >> Added
> > >> >> >Variable
> > >> >> >
> > >> >> > Initialization' lines **
> > >> >> >
> > >> >> > Â Â '// Begin Wizard Added Variable Initialization
> > >> >> > Â Â '// End Wizard Added Variable Initialization
> > >> >> > Â Â '// Begin Wizard Added Custom Method Calls
> > >> >> > Â Â '// End Wizard Added Custom Method Calls
> > >> >> > Â Â Â Â Â Â Â
> > >> >> > Â End Sub
> > >> >> > Â Â Â Â Â
> > >> >> > Â Sub DestroyCustomCode()
> > >> >> >
> > >> >> > Â Â '// ** Wizard Insert Location - Do not delete 'Begin/End
Wizard
> > >> >> Added
> > >> >> >Object
> > >> >> >
> > >> >> > Disposal' lines **
> > >> >> >
> > >> >> > Â Â '// Begin Wizard Added Object Disposal
> > >> >> > Â Â '// End Wizard Added Object Disposal
> > >> >> > Â Â '// Begin Custom Code Disposal
> > >> >> > Â Â '// End Custom Code Disposal
> > >> >> > Â End Sub
> > >> >> > Â Â Â Private Sub PartSearch()
> > >> >> > Â Â Â Dim lst As DataSet = read.GetList("Part", "Part.PartNum
> > >> >> MATCHES('" +
> > >> >> > epiUltraComboC2.Text &
> > >> >> "*')","PartNum,PartDescription,ClassID,UnitPrice")
> > >> >> > Â Â Â epiUltraComboC2.DataSource = lst
> > >> >> > Â Â Â epiUltraComboC2.ValueMember = "PartNum"
> > >> >> > Â Â Â epiUltraComboC2.DisplayMember = "PartNum"
> > >> >> > Â Â Â End Sub
> > >> >> > End Module
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> > ________________________________
> > >> >> > From: gmack110256 <genemack@>
> > >> >> > To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> > >> 40yahoogroups.com>
> > >>
> > >> >> > Sent: Mon, 27 September, 2010 13:19:54
> > >> >> > Subject: [Vantage] Auto Fill
> > >> >> >
> > >> >> > Â
> > >> >> > I think I got the Imports Epicor Lib. set now.
> > >> >> >
> > >> >> > Below is the syntax I have in the Script Editor. Everything seems to
> > >> >> work
> > >> >> >except
> > >> >> >
> > >> >> > I get the following error.
> > >> >> >
> > >> >> > Error: BC30289 - line 39 (236) - Statement cannot appear within a
> > >> method
> > >> >> body.
> > >> >>
> > >> >> > End of method assumed.
> > >> >> >
> > >> >> > Can anyone tell me what I am Missing.
> > >> >> >
> > >> >> > Gene
> > >> >> >
> > >> >> > Sub InitializeCustomCode()
> > >> >> >
> > >> >> > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> > >> >> >
> > >> >> >
> > >> >> > Private Sub PartSearch()
> > >> >> >
> > >> >> > Dim whereClause As String
> > >> >> >
> > >> >> > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
> > >> >> >
> > >> >> > Dim lst as Dataset =
> > >> >> >
> > >> >>
> > >>
> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> > [Non-text portions of this message have been removed]
> > >> >> >
> > >> >>
> > >> >> [Non-text portions of this message have been removed]
> > >> >>
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >>
> > >> [Non-text portions of this message have been removed]
> > >>
> > >> ------------------------------------
> > >>
> > >>
> > >> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> > >> have
> > >> already linked your email address to a yahoo id to enable access. )
> > >> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> > >> Crystal Reports and other 'goodies', please goto:
> > >> http://groups.yahoo.com/group/vantage/files/.
> > >>
> > >> (2) To search through old msg's goto:
> > >> http://groups.yahoo.com/group/vantage/messages
> > >> (3) To view links to Vendors that provide Vantage services goto:
> > >> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
> > >>
> > >>
> > >> [Non-text portions of this message have been removed]
> > >>
> > >>
> > >>
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>







[Non-text portions of this message have been removed]
I think I got the Imports Epicor Lib. set now.

Below is the syntax I have in the Script Editor. Everything seems to work except I get the following error.


Error: BC30289 - line 39 (236) - Statement cannot appear within a method body. End of method assumed.

Can anyone tell me what I am Missing.

Gene

Sub InitializeCustomCode()

read = New BOReader(SalesOrderForm.Session.ConnectionPool)


Private Sub PartSearch()

Dim whereClause As String

whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"

Dim lst as Dataset = read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
This is what I have so far - what else do I need to do to get it to work??

'//**************************************************
'// Custom VB.NET code for SalesOrderForm
'// Created: 27/09/2010 13:15:44
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.Lib
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO

Module Script

 '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module
Level Variables' Comments! **

 '// Begin Wizard Added Module Level Variables **
 '// End Wizard Added Module Level Variables **

 '// Add Custom Module Level Variables Here **
   Private read as BOReader = nothing
   '//Private rdr As Epicor.Mfg.Lib.BOReader

 Sub InitializeCustomCode()
   read = New BOReader(SalesOrderForm.Session.ConnectionPool)
  '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable
Initialization' lines **

  '// Begin Wizard Added Variable Initialization
  '// End Wizard Added Variable Initialization
  '// Begin Wizard Added Custom Method Calls
  '// End Wizard Added Custom Method Calls
      Â
 End Sub
    Â
 Sub DestroyCustomCode()

  '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object
Disposal' lines **

  '// Begin Wizard Added Object Disposal
  '// End Wizard Added Object Disposal
  '// Begin Custom Code Disposal
  '// End Custom Code Disposal
 End Sub
   Private Sub PartSearch()
   Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('" +
epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
   epiUltraComboC2.DataSource = lst
   epiUltraComboC2.ValueMember = "PartNum"
   epiUltraComboC2.DisplayMember = "PartNum"
   End Sub
End Module





________________________________
From: gmack110256 <genemack@...>
To: vantage@yahoogroups.com
Sent: Mon, 27 September, 2010 13:19:54
Subject: [Vantage] Auto Fill

Â
I think I got the Imports Epicor Lib. set now.

Below is the syntax I have in the Script Editor. Everything seems to work except
I get the following error.

Error: BC30289 - line 39 (236) - Statement cannot appear within a method body.
End of method assumed.

Can anyone tell me what I am Missing.

Gene

Sub InitializeCustomCode()

read = New BOReader(SalesOrderForm.Session.ConnectionPool)


Private Sub PartSearch()

Dim whereClause As String

whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"

Dim lst as Dataset =
read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")







[Non-text portions of this message have been removed]
Use the wizards to create the event code.

Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo, Custom Control is epiUltraCombo2(matching your code), Available Controls pick both Key Press and Key UP, then update all event code. In the event code that is created, enter code like:
If EpiUltraComboC2.Text.Length > 3 Then PartSearch

This was the 1st time I used the event wizard, really cool stuff!


--- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@...> wrote:
>
> This is what I have so far - what else do I need to do to get it to work??
>
> '//**************************************************
> '// Custom VB.NET code for SalesOrderForm
> '// Created: 27/09/2010 13:15:44
> '//**************************************************
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows.Forms
> Imports System.ComponentModel
> Imports Microsoft.VisualBasic
> Imports Epicor.Mfg.Lib
> Imports Epicor.Mfg.UI
> Imports Epicor.Mfg.UI.FrameWork
> Imports Epicor.Mfg.UI.ExtendedProps
> Imports Epicor.Mfg.UI.FormFunctions
> Imports Epicor.Mfg.UI.Customization
> Imports Epicor.Mfg.UI.Adapters
> Imports Epicor.Mfg.UI.Searches
> Imports Epicor.Mfg.BO
>
> Module Script
>
>  '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module
> Level Variables' Comments! **
>
>  '// Begin Wizard Added Module Level Variables **
>  '// End Wizard Added Module Level Variables **
>
>  '// Add Custom Module Level Variables Here **
>    Private read as BOReader = nothing
>    '//Private rdr As Epicor.Mfg.Lib.BOReader
>
>  Sub InitializeCustomCode()
>    read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>   '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable
> Initialization' lines **
>
>   '// Begin Wizard Added Variable Initialization
>   '// End Wizard Added Variable Initialization
>   '// Begin Wizard Added Custom Method Calls
>   '// End Wizard Added Custom Method Calls
>       ÂÂ
>  End Sub
>     ÂÂ
>  Sub DestroyCustomCode()
>
>   '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object
> Disposal' lines **
>
>   '// Begin Wizard Added Object Disposal
>   '// End Wizard Added Object Disposal
>   '// Begin Custom Code Disposal
>   '// End Custom Code Disposal
>  End Sub
>    Private Sub PartSearch()
>    Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('" +
> epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
>    epiUltraComboC2.DataSource = lst
>    epiUltraComboC2.ValueMember = "PartNum"
>    epiUltraComboC2.DisplayMember = "PartNum"
>    End Sub
> End Module
>
>
>
>
>
> ________________________________
> From: gmack110256 <genemack@...>
> To: vantage@yahoogroups.com
> Sent: Mon, 27 September, 2010 13:19:54
> Subject: [Vantage] Auto Fill
>
> ÂÂ
> I think I got the Imports Epicor Lib. set now.
>
> Below is the syntax I have in the Script Editor. Everything seems to work except
> I get the following error.
>
> Error: BC30289 - line 39 (236) - Statement cannot appear within a method body.
> End of method assumed.
>
> Can anyone tell me what I am Missing.
>
> Gene
>
> Sub InitializeCustomCode()
>
> read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>
>
> Private Sub PartSearch()
>
> Dim whereClause As String
>
> whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
>
> Dim lst as Dataset =
> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
I have selected 'Control Type Filter' (EpiUltraCombo).

There is nothing in the drop down box for Customer Control. Any idea why not?




________________________________
From: Dan Sirow <dansirow@...>
To: vantage@yahoogroups.com
Sent: Mon, 27 September, 2010 15:49:11
Subject: [Vantage] Re: Auto Fill

Â


Use the wizards to create the event code.

Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo, Custom
Control is epiUltraCombo2(matching your code), Available Controls pick both Key
Press and Key UP, then update all event code. In the event code that is created,
enter code like:
If EpiUltraComboC2.Text.Length > 3 Then PartSearch

This was the 1st time I used the event wizard, really cool stuff!

--- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@...> wrote:
>
> This is what I have so far - what else do I need to do to get it to work??
>
> '//**************************************************
> '// Custom VB.NET code for SalesOrderForm
> '// Created: 27/09/2010 13:15:44
> '//**************************************************
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows.Forms
> Imports System.ComponentModel
> Imports Microsoft.VisualBasic
> Imports Epicor.Mfg.Lib
> Imports Epicor.Mfg.UI
> Imports Epicor.Mfg.UI.FrameWork
> Imports Epicor.Mfg.UI.ExtendedProps
> Imports Epicor.Mfg.UI.FormFunctions
> Imports Epicor.Mfg.UI.Customization
> Imports Epicor.Mfg.UI.Adapters
> Imports Epicor.Mfg.UI.Searches
> Imports Epicor.Mfg.BO
>
> Module Script
>
>  '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module

> Level Variables' Comments! **
>
>  '// Begin Wizard Added Module Level Variables **
>  '// End Wizard Added Module Level Variables **
>
>  '// Add Custom Module Level Variables Here **
>    Private read as BOReader = nothing
>    '//Private rdr As Epicor.Mfg.Lib.BOReader
>
>  Sub InitializeCustomCode()
>    read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>   '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
>Variable
>
> Initialization' lines **
>
>   '// Begin Wizard Added Variable Initialization
>   '// End Wizard Added Variable Initialization
>   '// Begin Wizard Added Custom Method Calls
>   '// End Wizard Added Custom Method Calls
>       ÂÂ
>  End Sub
>     ÂÂ
>  Sub DestroyCustomCode()
>
>   '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
>Object
>
> Disposal' lines **
>
>   '// Begin Wizard Added Object Disposal
>   '// End Wizard Added Object Disposal
>   '// Begin Custom Code Disposal
>   '// End Custom Code Disposal
>  End Sub
>    Private Sub PartSearch()
>    Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('" +
> epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
>    epiUltraComboC2.DataSource = lst
>    epiUltraComboC2.ValueMember = "PartNum"
>    epiUltraComboC2.DisplayMember = "PartNum"
>    End Sub
> End Module
>
>
>
>
>
> ________________________________
> From: gmack110256 <genemack@...>
> To: vantage@yahoogroups.com
> Sent: Mon, 27 September, 2010 13:19:54
> Subject: [Vantage] Auto Fill
>
> ÂÂ
> I think I got the Imports Epicor Lib. set now.
>
> Below is the syntax I have in the Script Editor. Everything seems to work
>except
>
> I get the following error.
>
> Error: BC30289 - line 39 (236) - Statement cannot appear within a method body.

> End of method assumed.
>
> Can anyone tell me what I am Missing.
>
> Gene
>
> Sub InitializeCustomCode()
>
> read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>
>
> Private Sub PartSearch()
>
> Dim whereClause As String
>
> whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
>
> Dim lst as Dataset =
> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>







[Non-text portions of this message have been removed]
Ive got the Event Wizard to work now (I had to exit Customisation and go back in
to it).

I still can't get the search to work still. What should trigger the search - is
it as soon as you start typing in the Part field?


This is my code ...

'//**************************************************
'// Custom VB.NET code for SalesOrderForm
'// Created: 27/09/2010 13:15:44
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.Lib
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO

Module Script

 '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module
Level Variables' Comments! **

 '// Begin Wizard Added Module Level Variables **
 '// End Wizard Added Module Level Variables **

 '// Add Custom Module Level Variables Here **
   Private read as BOReader = nothing
   '//Private rdr As Epicor.Mfg.Lib.BOReader

 Sub InitializeCustomCode()
   read = New BOReader(SalesOrderForm.Session.ConnectionPool)
  '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable
Initialization' lines **

  '// Begin Wizard Added Variable Initialization
  '// End Wizard Added Variable Initialization
  '// Begin Wizard Added Custom Method Calls
  AddHandler epiUltraComboC2.KeyPress, AddressOf Script.epiUltraComboC2_KeyPress
  AddHandler epiUltraComboC2.KeyUp, AddressOf Script.epiUltraComboC2_KeyUp
  '// End Wizard Added Custom Method Calls
      Â
 End Sub
    Â
 Sub DestroyCustomCode()

  '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object
Disposal' lines **

  '// Begin Wizard Added Object Disposal
  RemoveHandler epiUltraComboC2.KeyPress, AddressOf
Script.epiUltraComboC2_KeyPress
  RemoveHandler epiUltraComboC2.KeyUp, AddressOf Script.epiUltraComboC2_KeyUp
  '// End Wizard Added Object Disposal
  '// Begin Custom Code Disposal
  '// End Custom Code Disposal
 End Sub
   Private Sub PartSearch()
   Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('" +
epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
   epiUltraComboC2.DataSource = lst
   epiUltraComboC2.ValueMember = "PartNum"
   epiUltraComboC2.DisplayMember = "PartNum"
   End Sub
 Private Sub epiUltraComboC2_KeyPress(ByVal sender As Object, ByVal args As
System.Windows.Forms.KeyPressEventArgs)
  ' ** Place Event Handling Code Here **
       If EpiUltraComboC2.Text.Length > 3 Then PartSearch
 End Sub

 Private Sub epiUltraComboC2_KeyUp(ByVal sender As Object, ByVal args As
System.Windows.Forms.KeyEventArgs)
  ' ** Place Event Handling Code Here **
       If EpiUltraComboC2.Text.Length > 3 Then PartSearch
 End Sub

End Module





________________________________
From: Dan Sirow <dansirow@...>
To: vantage@yahoogroups.com
Sent: Mon, 27 September, 2010 15:49:11
Subject: [Vantage] Re: Auto Fill

Â


Use the wizards to create the event code.

Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo, Custom
Control is epiUltraCombo2(matching your code), Available Controls pick both Key
Press and Key UP, then update all event code. In the event code that is created,
enter code like:
If EpiUltraComboC2.Text.Length > 3 Then PartSearch

This was the 1st time I used the event wizard, really cool stuff!

--- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@...> wrote:
>
> This is what I have so far - what else do I need to do to get it to work??
>
> '//**************************************************
> '// Custom VB.NET code for SalesOrderForm
> '// Created: 27/09/2010 13:15:44
> '//**************************************************
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows.Forms
> Imports System.ComponentModel
> Imports Microsoft.VisualBasic
> Imports Epicor.Mfg.Lib
> Imports Epicor.Mfg.UI
> Imports Epicor.Mfg.UI.FrameWork
> Imports Epicor.Mfg.UI.ExtendedProps
> Imports Epicor.Mfg.UI.FormFunctions
> Imports Epicor.Mfg.UI.Customization
> Imports Epicor.Mfg.UI.Adapters
> Imports Epicor.Mfg.UI.Searches
> Imports Epicor.Mfg.BO
>
> Module Script
>
>  '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module

> Level Variables' Comments! **
>
>  '// Begin Wizard Added Module Level Variables **
>  '// End Wizard Added Module Level Variables **
>
>  '// Add Custom Module Level Variables Here **
>    Private read as BOReader = nothing
>    '//Private rdr As Epicor.Mfg.Lib.BOReader
>
>  Sub InitializeCustomCode()
>    read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>   '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
>Variable
>
> Initialization' lines **
>
>   '// Begin Wizard Added Variable Initialization
>   '// End Wizard Added Variable Initialization
>   '// Begin Wizard Added Custom Method Calls
>   '// End Wizard Added Custom Method Calls
>       ÂÂ
>  End Sub
>     ÂÂ
>  Sub DestroyCustomCode()
>
>   '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
>Object
>
> Disposal' lines **
>
>   '// Begin Wizard Added Object Disposal
>   '// End Wizard Added Object Disposal
>   '// Begin Custom Code Disposal
>   '// End Custom Code Disposal
>  End Sub
>    Private Sub PartSearch()
>    Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('" +
> epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
>    epiUltraComboC2.DataSource = lst
>    epiUltraComboC2.ValueMember = "PartNum"
>    epiUltraComboC2.DisplayMember = "PartNum"
>    End Sub
> End Module
>
>
>
>
>
> ________________________________
> From: gmack110256 <genemack@...>
> To: vantage@yahoogroups.com
> Sent: Mon, 27 September, 2010 13:19:54
> Subject: [Vantage] Auto Fill
>
> ÂÂ
> I think I got the Imports Epicor Lib. set now.
>
> Below is the syntax I have in the Script Editor. Everything seems to work
>except
>
> I get the following error.
>
> Error: BC30289 - line 39 (236) - Statement cannot appear within a method body.

> End of method assumed.
>
> Can anyone tell me what I am Missing.
>
> Gene
>
> Sub InitializeCustomCode()
>
> read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>
>
> Private Sub PartSearch()
>
> Dim whereClause As String
>
> whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
>
> Dim lst as Dataset =
> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>



Reply to sender | Reply to group | Reply via web post | Start a New Topic
Messages in this topic (3)

Recent Activity: * New Members 2
Visit Your Group
Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.%c2%a0

(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links


Switch to: Text-Only, Daily Digest • Unsubscribe • Terms of Use
.




[Non-text portions of this message have been removed]
Hi

Ive finally got it working.

Do you know if there is any way that it can be customised even further to only
include 'manufactured' parts in the available parts that can be selected, rather
than displaying all parts?

Also what do I need to do to my code to allow it to search on Description as
well as Part Number?

I can see this code coming in useful all over!!

Thanks,

CHRIS



________________________________
From: Dan Sirow <dansirow@...>
To: vantage@yahoogroups.com
Sent: Mon, 27 September, 2010 15:49:11
Subject: [Vantage] Re: Auto Fill

Â


Use the wizards to create the event code.

Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo, Custom
Control is epiUltraCombo2(matching your code), Available Controls pick both Key
Press and Key UP, then update all event code. In the event code that is created,
enter code like:
If EpiUltraComboC2.Text.Length > 3 Then PartSearch

This was the 1st time I used the event wizard, really cool stuff!

--- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@...> wrote:
>
> This is what I have so far - what else do I need to do to get it to work??
>
> '//**************************************************
> '// Custom VB.NET code for SalesOrderForm
> '// Created: 27/09/2010 13:15:44
> '//**************************************************
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows.Forms
> Imports System.ComponentModel
> Imports Microsoft.VisualBasic
> Imports Epicor.Mfg.Lib
> Imports Epicor.Mfg.UI
> Imports Epicor.Mfg.UI.FrameWork
> Imports Epicor.Mfg.UI.ExtendedProps
> Imports Epicor.Mfg.UI.FormFunctions
> Imports Epicor.Mfg.UI.Customization
> Imports Epicor.Mfg.UI.Adapters
> Imports Epicor.Mfg.UI.Searches
> Imports Epicor.Mfg.BO
>
> Module Script
>
>  '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module

> Level Variables' Comments! **
>
>  '// Begin Wizard Added Module Level Variables **
>  '// End Wizard Added Module Level Variables **
>
>  '// Add Custom Module Level Variables Here **
>    Private read as BOReader = nothing
>    '//Private rdr As Epicor.Mfg.Lib.BOReader
>
>  Sub InitializeCustomCode()
>    read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>   '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
>Variable
>
> Initialization' lines **
>
>   '// Begin Wizard Added Variable Initialization
>   '// End Wizard Added Variable Initialization
>   '// Begin Wizard Added Custom Method Calls
>   '// End Wizard Added Custom Method Calls
>       ÂÂ
>  End Sub
>     ÂÂ
>  Sub DestroyCustomCode()
>
>   '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
>Object
>
> Disposal' lines **
>
>   '// Begin Wizard Added Object Disposal
>   '// End Wizard Added Object Disposal
>   '// Begin Custom Code Disposal
>   '// End Custom Code Disposal
>  End Sub
>    Private Sub PartSearch()
>    Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('" +
> epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
>    epiUltraComboC2.DataSource = lst
>    epiUltraComboC2.ValueMember = "PartNum"
>    epiUltraComboC2.DisplayMember = "PartNum"
>    End Sub
> End Module
>
>
>
>
>
> ________________________________
> From: gmack110256 <genemack@...>
> To: vantage@yahoogroups.com
> Sent: Mon, 27 September, 2010 13:19:54
> Subject: [Vantage] Auto Fill
>
> ÂÂ
> I think I got the Imports Epicor Lib. set now.
>
> Below is the syntax I have in the Script Editor. Everything seems to work
>except
>
> I get the following error.
>
> Error: BC30289 - line 39 (236) - Statement cannot appear within a method body.

> End of method assumed.
>
> Can anyone tell me what I am Missing.
>
> Gene
>
> Sub InitializeCustomCode()
>
> read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>
>
> Private Sub PartSearch()
>
> Dim whereClause As String
>
> whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
>
> Dim lst as Dataset =
> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>







[Non-text portions of this message have been removed]
If you look in the original thread? (Which BTW why did you all create
another one??) you shoulkd see the code for using Description, you can also
modify the query to include only manufactured parts the same way.
Sincerely
Jose C Gomez

http://www.josecgomez.com


On Mon, Sep 27, 2010 at 11:11 AM, Chris Thompson <chriselectrix@...>wrote:

>
>
> Hi
>
> Ive finally got it working.
>
> Do you know if there is any way that it can be customised even further to
> only
> include 'manufactured' parts in the available parts that can be selected,
> rather
> than displaying all parts?
>
> Also what do I need to do to my code to allow it to search on Description
> as
> well as Part Number?
>
> I can see this code coming in useful all over!!
>
> Thanks,
>
> CHRIS
>
>
> ________________________________
> From: Dan Sirow <dansirow@... <dansirow%40iccparts.com>>
> To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
>
> Sent: Mon, 27 September, 2010 15:49:11
> Subject: [Vantage] Re: Auto Fill
>
>
>
> Use the wizards to create the event code.
>
> Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
> Custom
> Control is epiUltraCombo2(matching your code), Available Controls pick both
> Key
> Press and Key UP, then update all event code. In the event code that is
> created,
> enter code like:
> If EpiUltraComboC2.Text.Length > 3 Then PartSearch
>
> This was the 1st time I used the event wizard, really cool stuff!
>
> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com>, Chris Thompson
> <chriselectrix@...> wrote:
> >
> > This is what I have so far - what else do I need to do to get it to
> work??
> >
> > '//**************************************************
> > '// Custom VB.NET code for SalesOrderForm
> > '// Created: 27/09/2010 13:15:44
> > '//**************************************************
> > Imports System
> > Imports System.Data
> > Imports System.Diagnostics
> > Imports System.Windows.Forms
> > Imports System.ComponentModel
> > Imports Microsoft.VisualBasic
> > Imports Epicor.Mfg.Lib
> > Imports Epicor.Mfg.UI
> > Imports Epicor.Mfg.UI.FrameWork
> > Imports Epicor.Mfg.UI.ExtendedProps
> > Imports Epicor.Mfg.UI.FormFunctions
> > Imports Epicor.Mfg.UI.Customization
> > Imports Epicor.Mfg.UI.Adapters
> > Imports Epicor.Mfg.UI.Searches
> > Imports Epicor.Mfg.BO
> >
> > Module Script
> >
> > � '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added
> Module
>
> > Level Variables' Comments! **
> >
> > � '// Begin Wizard Added Module Level Variables **
> > � '// End Wizard Added Module Level Variables **
> >
> > � '// Add Custom Module Level Variables Here **
> > � � � Private read as BOReader = nothing
> > � � � '//Private rdr As Epicor.Mfg.Lib.BOReader
> >
> > � Sub InitializeCustomCode()
> > � � � read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> > � � '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
>
> >Variable
> >
> > Initialization' lines **
> >
> > � � '// Begin Wizard Added Variable Initialization
> > � � '// End Wizard Added Variable Initialization
> > � � '// Begin Wizard Added Custom Method Calls
> > � � '// End Wizard Added Custom Method Calls
> > � � � � � � �
> > � End Sub
> > � � � � �
> > � Sub DestroyCustomCode()
> >
> > � � '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
>
> >Object
> >
> > Disposal' lines **
> >
> > � � '// Begin Wizard Added Object Disposal
> > � � '// End Wizard Added Object Disposal
> > � � '// Begin Custom Code Disposal
> > � � '// End Custom Code Disposal
> > � End Sub
> > � � � Private Sub PartSearch()
> > � � � Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
> +
> > epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
> > � � � epiUltraComboC2.DataSource = lst
> > � � � epiUltraComboC2.ValueMember = "PartNum"
> > � � � epiUltraComboC2.DisplayMember = "PartNum"
> > � � � End Sub
> > End Module
> >
> >
> >
> >
> >
> > ________________________________
> > From: gmack110256 <genemack@...>
> > To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
> > Sent: Mon, 27 September, 2010 13:19:54
> > Subject: [Vantage] Auto Fill
> >
> > �
> > I think I got the Imports Epicor Lib. set now.
> >
> > Below is the syntax I have in the Script Editor. Everything seems to work
>
> >except
> >
> > I get the following error.
> >
> > Error: BC30289 - line 39 (236) - Statement cannot appear within a method
> body.
>
> > End of method assumed.
> >
> > Can anyone tell me what I am Missing.
> >
> > Gene
> >
> > Sub InitializeCustomCode()
> >
> > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >
> >
> > Private Sub PartSearch()
> >
> > Dim whereClause As String
> >
> > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
> >
> > Dim lst as Dataset =
> >
> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
> >
> >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]
Just replace the where Clause with something like shown below. For Using
Description

String whereClause ="Part.PartNum MATCHES('"+epiUltraComboC1.Text+"*') OR
Part.PartDescription MATCHES ('"+epiUltraComboC1.Text+"*')";

DataSet lst = read.GetList("Part",whereClause
,"PartNum,PartDescription,ClassID,UnitPrice");


To show only Manufactured parts just modify the query again to looking at
whatever field that tells you its manufactured.. how do you know when a part
is manufactured???
If you tell me what you look at , I can give you the right query. However
keep in mind that if the field is outside of th Part table then you are
pretty much out of luck

Sincerely
Jose C Gomez

http://www.josecgomez.com


On Mon, Sep 27, 2010 at 11:37 AM, Jose Gomez <jose@...> wrote:

> If you look in the original thread? (Which BTW why did you all create
> another one??) you shoulkd see the code for using Description, you can also
> modify the query to include only manufactured parts the same way.
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
>
>
> On Mon, Sep 27, 2010 at 11:11 AM, Chris Thompson <chriselectrix@...>wrote:
>
>>
>>
>> Hi
>>
>> Ive finally got it working.
>>
>> Do you know if there is any way that it can be customised even further to
>> only
>> include 'manufactured' parts in the available parts that can be selected,
>> rather
>> than displaying all parts?
>>
>> Also what do I need to do to my code to allow it to search on Description
>> as
>> well as Part Number?
>>
>> I can see this code coming in useful all over!!
>>
>> Thanks,
>>
>> CHRIS
>>
>>
>> ________________________________
>> From: Dan Sirow <dansirow@... <dansirow%40iccparts.com>>
>> To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
>>
>> Sent: Mon, 27 September, 2010 15:49:11
>> Subject: [Vantage] Re: Auto Fill
>>
>>
>>
>> Use the wizards to create the event code.
>>
>> Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
>> Custom
>> Control is epiUltraCombo2(matching your code), Available Controls pick
>> both Key
>> Press and Key UP, then update all event code. In the event code that is
>> created,
>> enter code like:
>> If EpiUltraComboC2.Text.Length > 3 Then PartSearch
>>
>> This was the 1st time I used the event wizard, really cool stuff!
>>
>> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com>, Chris
>> Thompson <chriselectrix@...> wrote:
>> >
>> > This is what I have so far - what else do I need to do to get it to
>> work??
>> >
>> > '//**************************************************
>> > '// Custom VB.NET code for SalesOrderForm
>> > '// Created: 27/09/2010 13:15:44
>> > '//**************************************************
>> > Imports System
>> > Imports System.Data
>> > Imports System.Diagnostics
>> > Imports System.Windows.Forms
>> > Imports System.ComponentModel
>> > Imports Microsoft.VisualBasic
>> > Imports Epicor.Mfg.Lib
>> > Imports Epicor.Mfg.UI
>> > Imports Epicor.Mfg.UI.FrameWork
>> > Imports Epicor.Mfg.UI.ExtendedProps
>> > Imports Epicor.Mfg.UI.FormFunctions
>> > Imports Epicor.Mfg.UI.Customization
>> > Imports Epicor.Mfg.UI.Adapters
>> > Imports Epicor.Mfg.UI.Searches
>> > Imports Epicor.Mfg.BO
>> >
>> > Module Script
>> >
>> > � '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added
>> Module
>>
>> > Level Variables' Comments! **
>> >
>> > � '// Begin Wizard Added Module Level Variables **
>> > � '// End Wizard Added Module Level Variables **
>> >
>> > � '// Add Custom Module Level Variables Here **
>> > � � � Private read as BOReader = nothing
>> > � � � '//Private rdr As Epicor.Mfg.Lib.BOReader
>> >
>> > � Sub InitializeCustomCode()
>> > � � � read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>> > � � '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
>> Added
>> >Variable
>> >
>> > Initialization' lines **
>> >
>> > � � '// Begin Wizard Added Variable Initialization
>> > � � '// End Wizard Added Variable Initialization
>> > � � '// Begin Wizard Added Custom Method Calls
>> > � � '// End Wizard Added Custom Method Calls
>> > � � � � � � �
>> > � End Sub
>> > � � � � �
>> > � Sub DestroyCustomCode()
>> >
>> > � � '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
>> Added
>> >Object
>> >
>> > Disposal' lines **
>> >
>> > � � '// Begin Wizard Added Object Disposal
>> > � � '// End Wizard Added Object Disposal
>> > � � '// Begin Custom Code Disposal
>> > � � '// End Custom Code Disposal
>> > � End Sub
>> > � � � Private Sub PartSearch()
>> > � � � Dim lst As DataSet = read.GetList("Part", "Part.PartNum
>> MATCHES('" +
>> > epiUltraComboC2.Text &
>> "*')","PartNum,PartDescription,ClassID,UnitPrice")
>> > � � � epiUltraComboC2.DataSource = lst
>> > � � � epiUltraComboC2.ValueMember = "PartNum"
>> > � � � epiUltraComboC2.DisplayMember = "PartNum"
>> > � � � End Sub
>> > End Module
>> >
>> >
>> >
>> >
>> >
>> > ________________________________
>> > From: gmack110256 <genemack@...>
>> > To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
>> > Sent: Mon, 27 September, 2010 13:19:54
>> > Subject: [Vantage] Auto Fill
>> >
>> > �
>> > I think I got the Imports Epicor Lib. set now.
>> >
>> > Below is the syntax I have in the Script Editor. Everything seems to
>> work
>> >except
>> >
>> > I get the following error.
>> >
>> > Error: BC30289 - line 39 (236) - Statement cannot appear within a method
>> body.
>>
>> > End of method assumed.
>> >
>> > Can anyone tell me what I am Missing.
>> >
>> > Gene
>> >
>> > Sub InitializeCustomCode()
>> >
>> > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>> >
>> >
>> > Private Sub PartSearch()
>> >
>> > Dim whereClause As String
>> >
>> > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
>> >
>> > Dim lst as Dataset =
>> >
>> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > [Non-text portions of this message have been removed]
>> >
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>
>


[Non-text portions of this message have been removed]
What did you have to do to get the search working? I have put the code in to match your post, but it still will not perform the search.

Gene

--- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@...> wrote:
>
> Hi
>
> Ive finally got it working.
>
> Do you know if there is any way that it can be customised even further to only
> include 'manufactured' parts in the available parts that can be selected, rather
> than displaying all parts?
>
> Also what do I need to do to my code to allow it to search on Description as
> well as Part Number?
>
> I can see this code coming in useful all over!!
>
> Thanks,
>
> CHRIS
>
>
>
> ________________________________
> From: Dan Sirow <dansirow@...>
> To: vantage@yahoogroups.com
> Sent: Mon, 27 September, 2010 15:49:11
> Subject: [Vantage] Re: Auto Fill
>
> ÂÂ
>
>
> Use the wizards to create the event code.
>
> Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo, Custom
> Control is epiUltraCombo2(matching your code), Available Controls pick both Key
> Press and Key UP, then update all event code. In the event code that is created,
> enter code like:
> If EpiUltraComboC2.Text.Length > 3 Then PartSearch
>
> This was the 1st time I used the event wizard, really cool stuff!
>
> --- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@> wrote:
> >
> > This is what I have so far - what else do I need to do to get it to work??
> >
> > '//**************************************************
> > '// Custom VB.NET code for SalesOrderForm
> > '// Created: 27/09/2010 13:15:44
> > '//**************************************************
> > Imports System
> > Imports System.Data
> > Imports System.Diagnostics
> > Imports System.Windows.Forms
> > Imports System.ComponentModel
> > Imports Microsoft.VisualBasic
> > Imports Epicor.Mfg.Lib
> > Imports Epicor.Mfg.UI
> > Imports Epicor.Mfg.UI.FrameWork
> > Imports Epicor.Mfg.UI.ExtendedProps
> > Imports Epicor.Mfg.UI.FormFunctions
> > Imports Epicor.Mfg.UI.Customization
> > Imports Epicor.Mfg.UI.Adapters
> > Imports Epicor.Mfg.UI.Searches
> > Imports Epicor.Mfg.BO
> >
> > Module Script
> >
> >  '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module
>
> > Level Variables' Comments! **
> >
> >  '// Begin Wizard Added Module Level Variables **
> >  '// End Wizard Added Module Level Variables **
> >
> >  '// Add Custom Module Level Variables Here **
> >    Private read as BOReader = nothing
> >    '//Private rdr As Epicor.Mfg.Lib.BOReader
> >
> >  Sub InitializeCustomCode()
> >    read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >   '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
> >Variable
> >
> > Initialization' lines **
> >
> >   '// Begin Wizard Added Variable Initialization
> >   '// End Wizard Added Variable Initialization
> >   '// Begin Wizard Added Custom Method Calls
> >   '// End Wizard Added Custom Method Calls
> >       ÂÂÂ
> >  End Sub
> >     ÂÂÂ
> >  Sub DestroyCustomCode()
> >
> >   '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
> >Object
> >
> > Disposal' lines **
> >
> >   '// Begin Wizard Added Object Disposal
> >   '// End Wizard Added Object Disposal
> >   '// Begin Custom Code Disposal
> >   '// End Custom Code Disposal
> >  End Sub
> >    Private Sub PartSearch()
> >    Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('" +
> > epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
> >    epiUltraComboC2.DataSource = lst
> >    epiUltraComboC2.ValueMember = "PartNum"
> >    epiUltraComboC2.DisplayMember = "PartNum"
> >    End Sub
> > End Module
> >
> >
> >
> >
> >
> > ________________________________
> > From: gmack110256 <genemack@>
> > To: vantage@yahoogroups.com
> > Sent: Mon, 27 September, 2010 13:19:54
> > Subject: [Vantage] Auto Fill
> >
> > ÂÂÂ
> > I think I got the Imports Epicor Lib. set now.
> >
> > Below is the syntax I have in the Script Editor. Everything seems to work
> >except
> >
> > I get the following error.
> >
> > Error: BC30289 - line 39 (236) - Statement cannot appear within a method body.
>
> > End of method assumed.
> >
> > Can anyone tell me what I am Missing.
> >
> > Gene
> >
> > Sub InitializeCustomCode()
> >
> > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >
> >
> > Private Sub PartSearch()
> >
> > Dim whereClause As String
> >
> > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
> >
> > Dim lst as Dataset =
> > read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
> >
> >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Gene

What do you mean? I am not understanding your question. What are you trying
to do?


Sincerely
Jose C Gomez

http://www.josecgomez.com


On Mon, Sep 27, 2010 at 12:46 PM, gmack110256 <genemack@...>wrote:

>
>
> What did you have to do to get the search working? I have put the code in
> to match your post, but it still will not perform the search.
>
> Gene
>
>
> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com>, Chris Thompson
> <chriselectrix@...> wrote:
> >
> > Hi
> >
> > Ive finally got it working.
> >
> > Do you know if there is any way that it can be customised even further to
> only
> > include 'manufactured' parts in the available parts that can be selected,
> rather
> > than displaying all parts?
> >
> > Also what do I need to do to my code to allow it to search on Description
> as
> > well as Part Number?
> >
> > I can see this code coming in useful all over!!
> >
> > Thanks,
> >
> > CHRIS
> >
> >
> >
> > ________________________________
> > From: Dan Sirow <dansirow@...>
>
> > To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
> > Sent: Mon, 27 September, 2010 15:49:11
> > Subject: [Vantage] Re: Auto Fill
> >
> > �
> >
> >
> > Use the wizards to create the event code.
> >
> > Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
> Custom
> > Control is epiUltraCombo2(matching your code), Available Controls pick
> both Key
> > Press and Key UP, then update all event code. In the event code that is
> created,
> > enter code like:
> > If EpiUltraComboC2.Text.Length > 3 Then PartSearch
> >
> > This was the 1st time I used the event wizard, really cool stuff!
> >
> > --- In vantage@yahoogroups.com <vantage%40yahoogroups.com>, Chris
> Thompson <chriselectrix@> wrote:
> > >
> > > This is what I have so far - what else do I need to do to get it to
> work??
> > >
> > > '//**************************************************
> > > '// Custom VB.NET code for SalesOrderForm
> > > '// Created: 27/09/2010 13:15:44
> > > '//**************************************************
> > > Imports System
> > > Imports System.Data
> > > Imports System.Diagnostics
> > > Imports System.Windows.Forms
> > > Imports System.ComponentModel
> > > Imports Microsoft.VisualBasic
> > > Imports Epicor.Mfg.Lib
> > > Imports Epicor.Mfg.UI
> > > Imports Epicor.Mfg.UI.FrameWork
> > > Imports Epicor.Mfg.UI.ExtendedProps
> > > Imports Epicor.Mfg.UI.FormFunctions
> > > Imports Epicor.Mfg.UI.Customization
> > > Imports Epicor.Mfg.UI.Adapters
> > > Imports Epicor.Mfg.UI.Searches
> > > Imports Epicor.Mfg.BO
> > >
> > > Module Script
> > >
> > > ��� '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard
> Added Module
> >
> > > Level Variables' Comments! **
> > >
> > > ��� '// Begin Wizard Added Module Level Variables **
> > > ��� '// End Wizard Added Module Level Variables **
> > >
> > > ��� '// Add Custom Module Level Variables Here **
> > > ��� ��� ��� Private read as BOReader = nothing
> > > ��� ��� ��� '//Private rdr As Epicor.Mfg.Lib.BOReader
> > >
> > > ��� Sub InitializeCustomCode()
> > > ��� ��� ��� read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> > > ��� ��� '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> Added
> > >Variable
> > >
> > > Initialization' lines **
> > >
> > > ��� ��� '// Begin Wizard Added Variable Initialization
> > > ��� ��� '// End Wizard Added Variable Initialization
> > > ��� ��� '// Begin Wizard Added Custom Method Calls
> > > ��� ��� '// End Wizard Added Custom Method Calls
> > > ��� ��� ��� ��� ��� ��� ���
> > > ��� End Sub
> > > ��� ��� ��� ��� ���
> > > ��� Sub DestroyCustomCode()
> > >
> > > ��� ��� '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> Added
> > >Object
> > >
> > > Disposal' lines **
> > >
> > > ��� ��� '// Begin Wizard Added Object Disposal
> > > ��� ��� '// End Wizard Added Object Disposal
> > > ��� ��� '// Begin Custom Code Disposal
> > > ��� ��� '// End Custom Code Disposal
> > > ��� End Sub
> > > ��� ��� ��� Private Sub PartSearch()
> > > ��� ��� ��� Dim lst As DataSet = read.GetList("Part", "Part.PartNum
> MATCHES('" +
> > > epiUltraComboC2.Text &
> "*')","PartNum,PartDescription,ClassID,UnitPrice")
> > > ��� ��� ��� epiUltraComboC2.DataSource = lst
> > > ��� ��� ��� epiUltraComboC2.ValueMember = "PartNum"
> > > ��� ��� ��� epiUltraComboC2.DisplayMember = "PartNum"
> > > ��� ��� ��� End Sub
>
> > > End Module
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: gmack110256 <genemack@>
> > > To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
> > > Sent: Mon, 27 September, 2010 13:19:54
> > > Subject: [Vantage] Auto Fill
> > >
> > > ���
> > > I think I got the Imports Epicor Lib. set now.
> > >
> > > Below is the syntax I have in the Script Editor. Everything seems to
> work
> > >except
> > >
> > > I get the following error.
> > >
> > > Error: BC30289 - line 39 (236) - Statement cannot appear within a
> method body.
> >
> > > End of method assumed.
> > >
> > > Can anyone tell me what I am Missing.
> > >
> > > Gene
> > >
> > > Sub InitializeCustomCode()
> > >
> > > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> > >
> > >
> > > Private Sub PartSearch()
> > >
> > > Dim whereClause As String
> > >
> > > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
> > >
> > > Dim lst as Dataset =
> > >
> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>


[Non-text portions of this message have been removed]
I still can't get the Auto fill to work properly. I put in the set up to match the set up Chris had. When I test the code the compiler says everything should be working o.k.

When I open the Sales order Entry form and start entering a part number it still will not produce a list. I am not sure what I have missed on the setup at this point.

My script editor seems to match line by line with what I have seen on the Post in the group.

Gene
--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> Gene
>
> What do you mean? I am not understanding your question. What are you trying
> to do?
>
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
>
> On Mon, Sep 27, 2010 at 12:46 PM, gmack110256 <genemack@...>wrote:
>
> >
> >
> > What did you have to do to get the search working? I have put the code in
> > to match your post, but it still will not perform the search.
> >
> > Gene
> >
> >
> > --- In vantage@yahoogroups.com <vantage%40yahoogroups.com>, Chris Thompson
> > <chriselectrix@> wrote:
> > >
> > > Hi
> > >
> > > Ive finally got it working.
> > >
> > > Do you know if there is any way that it can be customised even further to
> > only
> > > include 'manufactured' parts in the available parts that can be selected,
> > rather
> > > than displaying all parts?
> > >
> > > Also what do I need to do to my code to allow it to search on Description
> > as
> > > well as Part Number?
> > >
> > > I can see this code coming in useful all over!!
> > >
> > > Thanks,
> > >
> > > CHRIS
> > >
> > >
> > >
> > > ________________________________
> > > From: Dan Sirow <dansirow@>
> >
> > > To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
> > > Sent: Mon, 27 September, 2010 15:49:11
> > > Subject: [Vantage] Re: Auto Fill
> > >
> > > Â
> > >
> > >
> > > Use the wizards to create the event code.
> > >
> > > Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
> > Custom
> > > Control is epiUltraCombo2(matching your code), Available Controls pick
> > both Key
> > > Press and Key UP, then update all event code. In the event code that is
> > created,
> > > enter code like:
> > > If EpiUltraComboC2.Text.Length > 3 Then PartSearch
> > >
> > > This was the 1st time I used the event wizard, really cool stuff!
> > >
> > > --- In vantage@yahoogroups.com <vantage%40yahoogroups.com>, Chris
> > Thompson <chriselectrix@> wrote:
> > > >
> > > > This is what I have so far - what else do I need to do to get it to
> > work??
> > > >
> > > > '//**************************************************
> > > > '// Custom VB.NET code for SalesOrderForm
> > > > '// Created: 27/09/2010 13:15:44
> > > > '//**************************************************
> > > > Imports System
> > > > Imports System.Data
> > > > Imports System.Diagnostics
> > > > Imports System.Windows.Forms
> > > > Imports System.ComponentModel
> > > > Imports Microsoft.VisualBasic
> > > > Imports Epicor.Mfg.Lib
> > > > Imports Epicor.Mfg.UI
> > > > Imports Epicor.Mfg.UI.FrameWork
> > > > Imports Epicor.Mfg.UI.ExtendedProps
> > > > Imports Epicor.Mfg.UI.FormFunctions
> > > > Imports Epicor.Mfg.UI.Customization
> > > > Imports Epicor.Mfg.UI.Adapters
> > > > Imports Epicor.Mfg.UI.Searches
> > > > Imports Epicor.Mfg.BO
> > > >
> > > > Module Script
> > > >
> > > >  '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard
> > Added Module
> > >
> > > > Level Variables' Comments! **
> > > >
> > > >  '// Begin Wizard Added Module Level Variables **
> > > >  '// End Wizard Added Module Level Variables **
> > > >
> > > >  '// Add Custom Module Level Variables Here **
> > > >    Private read as BOReader = nothing
> > > >    '//Private rdr As Epicor.Mfg.Lib.BOReader
> > > >
> > > >  Sub InitializeCustomCode()
> > > >    read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> > > >   '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> > Added
> > > >Variable
> > > >
> > > > Initialization' lines **
> > > >
> > > >   '// Begin Wizard Added Variable Initialization
> > > >   '// End Wizard Added Variable Initialization
> > > >   '// Begin Wizard Added Custom Method Calls
> > > >   '// End Wizard Added Custom Method Calls
> > > >       ÂÂ
> > > >  End Sub
> > > >     ÂÂ
> > > >  Sub DestroyCustomCode()
> > > >
> > > >   '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> > Added
> > > >Object
> > > >
> > > > Disposal' lines **
> > > >
> > > >   '// Begin Wizard Added Object Disposal
> > > >   '// End Wizard Added Object Disposal
> > > >   '// Begin Custom Code Disposal
> > > >   '// End Custom Code Disposal
> > > >  End Sub
> > > >    Private Sub PartSearch()
> > > >    Dim lst As DataSet = read.GetList("Part", "Part.PartNum
> > MATCHES('" +
> > > > epiUltraComboC2.Text &
> > "*')","PartNum,PartDescription,ClassID,UnitPrice")
> > > >    epiUltraComboC2.DataSource = lst
> > > >    epiUltraComboC2.ValueMember = "PartNum"
> > > >    epiUltraComboC2.DisplayMember = "PartNum"
> > > >    End Sub
> >
> > > > End Module
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: gmack110256 <genemack@>
> > > > To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
> > > > Sent: Mon, 27 September, 2010 13:19:54
> > > > Subject: [Vantage] Auto Fill
> > > >
> > > > ÂÂ
> > > > I think I got the Imports Epicor Lib. set now.
> > > >
> > > > Below is the syntax I have in the Script Editor. Everything seems to
> > work
> > > >except
> > > >
> > > > I get the following error.
> > > >
> > > > Error: BC30289 - line 39 (236) - Statement cannot appear within a
> > method body.
> > >
> > > > End of method assumed.
> > > >
> > > > Can anyone tell me what I am Missing.
> > > >
> > > > Gene
> > > >
> > > > Sub InitializeCustomCode()
> > > >
> > > > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> > > >
> > > >
> > > > Private Sub PartSearch()
> > > >
> > > > Dim whereClause As String
> > > >
> > > > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
> > > >
> > > > Dim lst as Dataset =
> > > >
> > read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
Within Part Maintenance, there is field (drop down) called 'Type' and you have
the choice of Manufactured, Purchased or Sales Kit.

We would only look at 'Manufactured' parts when add lines to orders.

The field is Part.TypeCode.

Thanks.




________________________________
From: Jose Gomez <jose@...>
To: vantage@yahoogroups.com
Sent: Mon, 27 September, 2010 16:54:55
Subject: Re: [Vantage] Re: Auto Fill

Just replace the where Clause with something like shown below. For Using
Description

String whereClause ="Part.PartNum MATCHES('"+epiUltraComboC1.Text+"*') OR
Part.PartDescription MATCHES ('"+epiUltraComboC1.Text+"*')";

DataSet lst = read.GetList("Part",whereClause
,"PartNum,PartDescription,ClassID,UnitPrice");


To show only Manufactured parts just modify the query again to looking at
whatever field that tells you its manufactured.. how do you know when a part
is manufactured???
If you tell me what you look at , I can give you the right query. However
keep in mind that if the field is outside of th Part table then you are
pretty much out of luck

Sincerely
Jose C Gomez

http://www.josecgomez.com


On Mon, Sep 27, 2010 at 11:37 AM, Jose Gomez <jose@...> wrote:

> If you look in the original thread? (Which BTW why did you all create
> another one??) you shoulkd see the code for using Description, you can also
> modify the query to include only manufactured parts the same way.
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
>
>
> On Mon, Sep 27, 2010 at 11:11 AM, Chris Thompson
><chriselectrix@...>wrote:
>
>>
>>
>> Hi
>>
>> Ive finally got it working.
>>
>> Do you know if there is any way that it can be customised even further to
>> only
>> include 'manufactured' parts in the available parts that can be selected,
>> rather
>> than displaying all parts?
>>
>> Also what do I need to do to my code to allow it to search on Description
>> as
>> well as Part Number?
>>
>> I can see this code coming in useful all over!!
>>
>> Thanks,
>>
>> CHRIS
>>
>>
>> ________________________________
>> From: Dan Sirow <dansirow@... <dansirow%40iccparts.com>>
>> To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
>>
>> Sent: Mon, 27 September, 2010 15:49:11
>> Subject: [Vantage] Re: Auto Fill
>>
>>
>>
>> Use the wizards to create the event code.
>>
>> Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
>> Custom
>> Control is epiUltraCombo2(matching your code), Available Controls pick
>> both Key
>> Press and Key UP, then update all event code. In the event code that is
>> created,
>> enter code like:
>> If EpiUltraComboC2.Text.Length > 3 Then PartSearch
>>
>> This was the 1st time I used the event wizard, really cool stuff!
>>
>> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com>, Chris
>> Thompson <chriselectrix@...> wrote:
>> >
>> > This is what I have so far - what else do I need to do to get it to
>> work??
>> >
>> > '//**************************************************
>> > '// Custom VB.NET code for SalesOrderForm
>> > '// Created: 27/09/2010 13:15:44
>> > '//**************************************************
>> > Imports System
>> > Imports System.Data
>> > Imports System.Diagnostics
>> > Imports System.Windows.Forms
>> > Imports System.ComponentModel
>> > Imports Microsoft.VisualBasic
>> > Imports Epicor.Mfg.Lib
>> > Imports Epicor.Mfg.UI
>> > Imports Epicor.Mfg.UI.FrameWork
>> > Imports Epicor.Mfg.UI.ExtendedProps
>> > Imports Epicor.Mfg.UI.FormFunctions
>> > Imports Epicor.Mfg.UI.Customization
>> > Imports Epicor.Mfg.UI.Adapters
>> > Imports Epicor.Mfg.UI.Searches
>> > Imports Epicor.Mfg.BO
>> >
>> > Module Script
>> >
>> > Â '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added
>> Module
>>
>> > Level Variables' Comments! **
>> >
>> > Â '// Begin Wizard Added Module Level Variables **
>> > Â '// End Wizard Added Module Level Variables **
>> >
>> > Â '// Add Custom Module Level Variables Here **
>> >    Private read as BOReader = nothing
>> >    '//Private rdr As Epicor.Mfg.Lib.BOReader
>> >
>> > Â Sub InitializeCustomCode()
>> >    read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>> > Â Â '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
>> Added
>> >Variable
>> >
>> > Initialization' lines **
>> >
>> > Â Â '// Begin Wizard Added Variable Initialization
>> > Â Â '// End Wizard Added Variable Initialization
>> > Â Â '// Begin Wizard Added Custom Method Calls
>> > Â Â '// End Wizard Added Custom Method Calls
>> > Â Â Â Â Â Â Â
>> > Â End Sub
>> > Â Â Â Â Â
>> > Â Sub DestroyCustomCode()
>> >
>> > Â Â '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
>> Added
>> >Object
>> >
>> > Disposal' lines **
>> >
>> > Â Â '// Begin Wizard Added Object Disposal
>> > Â Â '// End Wizard Added Object Disposal
>> > Â Â '// Begin Custom Code Disposal
>> > Â Â '// End Custom Code Disposal
>> > Â End Sub
>> >    Private Sub PartSearch()
>> >    Dim lst As DataSet = read.GetList("Part", "Part.PartNum
>> MATCHES('" +
>> > epiUltraComboC2.Text &
>> "*')","PartNum,PartDescription,ClassID,UnitPrice")
>> >    epiUltraComboC2.DataSource = lst
>> >    epiUltraComboC2.ValueMember = "PartNum"
>> >    epiUltraComboC2.DisplayMember = "PartNum"
>> >    End Sub
>> > End Module
>> >
>> >
>> >
>> >
>> >
>> > ________________________________
>> > From: gmack110256 <genemack@...>
>> > To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
>> > Sent: Mon, 27 September, 2010 13:19:54
>> > Subject: [Vantage] Auto Fill
>> >
>> > Â
>> > I think I got the Imports Epicor Lib. set now.
>> >
>> > Below is the syntax I have in the Script Editor. Everything seems to
>> work
>> >except
>> >
>> > I get the following error.
>> >
>> > Error: BC30289 - line 39 (236) - Statement cannot appear within a method
>> body.
>>
>> > End of method assumed.
>> >
>> > Can anyone tell me what I am Missing.
>> >
>> > Gene
>> >
>> > Sub InitializeCustomCode()
>> >
>> > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>> >
>> >
>> > Private Sub PartSearch()
>> >
>> > Dim whereClause As String
>> >
>> > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
>> >
>> > Dim lst as Dataset =
>> >
>> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > [Non-text portions of this message have been removed]
>> >
>>
>> [Non-text portions of this message have been removed]
>>
>>Â
>>
>
>


[Non-text portions of this message have been removed]



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.%c2%a0

(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links






[Non-text portions of this message have been removed]
Assuming that the code for manufactured is M

Then you would do

String whereClause ="(Part.PartNum MATCHES('"+epiUltraComboC1.Text+"*')
OR Part.PartDescription MATCHES ('"+epiUltraComboC1.Text+"*')) AND
Part.TypeCode='M' ";




Sincerely
Jose C Gomez

http://www.josecgomez.com


On Tue, Sep 28, 2010 at 4:17 AM, Chris Thompson <chriselectrix@...>wrote:

>
>
> Within Part Maintenance, there is field (drop down) called 'Type' and you
> have
> the choice of Manufactured, Purchased or Sales Kit.
>
> We would only look at 'Manufactured' parts when add lines to orders.
>
> The field is Part.TypeCode.
>
> Thanks.
>
> ________________________________
> From: Jose Gomez <jose@... <jose%40josecgomez.com>>
> To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
> Sent: Mon, 27 September, 2010 16:54:55
> Subject: Re: [Vantage] Re: Auto Fill
>
>
> Just replace the where Clause with something like shown below. For Using
> Description
>
> String whereClause ="Part.PartNum MATCHES('"+epiUltraComboC1.Text+"*') OR
> Part.PartDescription MATCHES ('"+epiUltraComboC1.Text+"*')";
>
> DataSet lst = read.GetList("Part",whereClause
> ,"PartNum,PartDescription,ClassID,UnitPrice");
>
> To show only Manufactured parts just modify the query again to looking at
> whatever field that tells you its manufactured.. how do you know when a
> part
> is manufactured???
> If you tell me what you look at , I can give you the right query. However
> keep in mind that if the field is outside of th Part table then you are
> pretty much out of luck
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
> On Mon, Sep 27, 2010 at 11:37 AM, Jose Gomez <jose@...<jose%40josecgomez.com>>
> wrote:
>
> > If you look in the original thread? (Which BTW why did you all create
> > another one??) you shoulkd see the code for using Description, you can
> also
> > modify the query to include only manufactured parts the same way.
> > Sincerely
> > Jose C Gomez
> >
> > http://www.josecgomez.com
> >
> >
> >
> > On Mon, Sep 27, 2010 at 11:11 AM, Chris Thompson
> ><chriselectrix@... <chriselectrix%40ymail.com>>wrote:
> >
> >>
> >>
> >> Hi
> >>
> >> Ive finally got it working.
> >>
> >> Do you know if there is any way that it can be customised even further
> to
> >> only
> >> include 'manufactured' parts in the available parts that can be
> selected,
> >> rather
> >> than displaying all parts?
> >>
> >> Also what do I need to do to my code to allow it to search on
> Description
> >> as
> >> well as Part Number?
> >>
> >> I can see this code coming in useful all over!!
> >>
> >> Thanks,
> >>
> >> CHRIS
> >>
> >>
> >> ________________________________
> >> From: Dan Sirow <dansirow@... <dansirow%40iccparts.com><dansirow%
> 40iccparts.com>>
> >> To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> 40yahoogroups.com>
>
> >>
> >> Sent: Mon, 27 September, 2010 15:49:11
> >> Subject: [Vantage] Re: Auto Fill
> >>
> >>
> >>
> >> Use the wizards to create the event code.
> >>
> >> Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
> >> Custom
> >> Control is epiUltraCombo2(matching your code), Available Controls pick
> >> both Key
> >> Press and Key UP, then update all event code. In the event code that is
> >> created,
> >> enter code like:
> >> If EpiUltraComboC2.Text.Length > 3 Then PartSearch
> >>
> >> This was the 1st time I used the event wizard, really cool stuff!
> >>
> >> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> 40yahoogroups.com>, Chris
>
> >> Thompson <chriselectrix@...> wrote:
> >> >
> >> > This is what I have so far - what else do I need to do to get it to
> >> work??
> >> >
> >> > '//**************************************************
> >> > '// Custom VB.NET code for SalesOrderForm
> >> > '// Created: 27/09/2010 13:15:44
> >> > '//**************************************************
> >> > Imports System
> >> > Imports System.Data
> >> > Imports System.Diagnostics
> >> > Imports System.Windows.Forms
> >> > Imports System.ComponentModel
> >> > Imports Microsoft.VisualBasic
> >> > Imports Epicor.Mfg.Lib
> >> > Imports Epicor.Mfg.UI
> >> > Imports Epicor.Mfg.UI.FrameWork
> >> > Imports Epicor.Mfg.UI.ExtendedProps
> >> > Imports Epicor.Mfg.UI.FormFunctions
> >> > Imports Epicor.Mfg.UI.Customization
> >> > Imports Epicor.Mfg.UI.Adapters
> >> > Imports Epicor.Mfg.UI.Searches
> >> > Imports Epicor.Mfg.BO
> >> >
> >> > Module Script
> >> >
> >> > � '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard
> Added
> >> Module
> >>
> >> > Level Variables' Comments! **
> >> >
> >> > � '// Begin Wizard Added Module Level Variables **
> >> > � '// End Wizard Added Module Level Variables **
> >> >
> >> > � '// Add Custom Module Level Variables Here **
> >> > � � � Private read as BOReader = nothing
> >> > � � � '//Private rdr As Epicor.Mfg.Lib.BOReader
> >> >
> >> > � Sub InitializeCustomCode()
> >> > � � � read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >> > � � '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> >> Added
> >> >Variable
> >> >
> >> > Initialization' lines **
> >> >
> >> > � � '// Begin Wizard Added Variable Initialization
> >> > � � '// End Wizard Added Variable Initialization
> >> > � � '// Begin Wizard Added Custom Method Calls
> >> > � � '// End Wizard Added Custom Method Calls
> >> > � � � � � � �
> >> > � End Sub
> >> > � � � � �
> >> > � Sub DestroyCustomCode()
> >> >
> >> > � � '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> >> Added
> >> >Object
> >> >
> >> > Disposal' lines **
> >> >
> >> > � � '// Begin Wizard Added Object Disposal
> >> > � � '// End Wizard Added Object Disposal
> >> > � � '// Begin Custom Code Disposal
> >> > � � '// End Custom Code Disposal
> >> > � End Sub
> >> > � � � Private Sub PartSearch()
> >> > � � � Dim lst As DataSet = read.GetList("Part", "Part.PartNum
> >> MATCHES('" +
> >> > epiUltraComboC2.Text &
> >> "*')","PartNum,PartDescription,ClassID,UnitPrice")
> >> > � � � epiUltraComboC2.DataSource = lst
> >> > � � � epiUltraComboC2.ValueMember = "PartNum"
> >> > � � � epiUltraComboC2.DisplayMember = "PartNum"
> >> > � � � End Sub
> >> > End Module
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > ________________________________
> >> > From: gmack110256 <genemack@...>
> >> > To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> 40yahoogroups.com>
>
> >> > Sent: Mon, 27 September, 2010 13:19:54
> >> > Subject: [Vantage] Auto Fill
> >> >
> >> > �
> >> > I think I got the Imports Epicor Lib. set now.
> >> >
> >> > Below is the syntax I have in the Script Editor. Everything seems to
> >> work
> >> >except
> >> >
> >> > I get the following error.
> >> >
> >> > Error: BC30289 - line 39 (236) - Statement cannot appear within a
> method
> >> body.
> >>
> >> > End of method assumed.
> >> >
> >> > Can anyone tell me what I am Missing.
> >> >
> >> > Gene
> >> >
> >> > Sub InitializeCustomCode()
> >> >
> >> > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >> >
> >> >
> >> > Private Sub PartSearch()
> >> >
> >> > Dim whereClause As String
> >> >
> >> > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
> >> >
> >> > Dim lst as Dataset =
> >> >
> >>
> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > [Non-text portions of this message have been removed]
> >> >
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >>
> >>
> >
> >
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
>
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
>
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]
Hi Jose

This is what I have ...

'//**************************************************
'// Custom VB.NET code for SalesOrderForm
'// Created: 27/09/2010 13:15:44
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.Lib
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO

Module Script

 '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module
Level Variables' Comments! **

 '// Begin Wizard Added Module Level Variables **
 '// End Wizard Added Module Level Variables **

 '// Add Custom Module Level Variables Here **
   Private read as BOReader = nothing
   '//Private rdr As Epicor.Mfg.Lib.BOReader

 Sub InitializeCustomCode()
   read = New BOReader(SalesOrderForm.Session.ConnectionPool)
  '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable
Initialization' lines **

  '// Begin Wizard Added Variable Initialization
  '// End Wizard Added Variable Initialization
  '// Begin Wizard Added Custom Method Calls
  AddHandler epiUltraComboC2.KeyPress, AddressOf Script.epiUltraComboC2_KeyPress
  AddHandler epiUltraComboC2.KeyUp, AddressOf Script.epiUltraComboC2_KeyUp
  '// End Wizard Added Custom Method Calls
      Â
 End Sub
    Â
 Sub DestroyCustomCode()

  '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object
Disposal' lines **

  '// Begin Wizard Added Object Disposal
  RemoveHandler epiUltraComboC2.KeyPress, AddressOf
Script.epiUltraComboC2_KeyPress
  RemoveHandler epiUltraComboC2.KeyUp, AddressOf Script.epiUltraComboC2_KeyUp
  '// End Wizard Added Object Disposal
  '// Begin Custom Code Disposal
  '// End Custom Code Disposal
 End Sub
   Private Sub PartSearch()
   '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('" +
epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
   '// String whereClause = ("Part.PartNum MATCHES('" + epiUltraComboC2.Text &
"*') OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*'))
   '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('" +
epiUltraComboC2.Text & "*')" OR "Part.Description MATCHES('" +
epiUltraComboC2.Text & "*')", "PartNum,Description,ClassID,UnitPrice")Â Â Â

  Â
   String WhereClause = "Part.PartNum MATCHES('" + epiUltraComboC2.Text & "*')"
OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
   DataSet lst =
read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")
  Â
   epiUltraComboC2.DataSource = lst
   epiUltraComboC2.ValueMember = "PartNum"
   epiUltraComboC2.DisplayMember = "PartNum"
   End Sub
 Private Sub epiUltraComboC2_KeyPress(ByVal sender As Object, ByVal args As
System.Windows.Forms.KeyPressEventArgs)
  ' ** Place Event Handling Code Here **
       If EpiUltraComboC2.Text.Length > 2 Then PartSearch
 End Sub

 Private Sub epiUltraComboC2_KeyUp(ByVal sender As Object, ByVal args As
System.Windows.Forms.KeyEventArgs)
  ' ** Place Event Handling Code Here **
       If EpiUltraComboC2.Text.Length > 2 Then PartSearch
 End Sub

End Module


And this is the compile errors I am getting ...

Compiling Custom Code ...

----------errors------------
 Error: BC30109 - line 74 (415) - 'String' is a class type and cannot be used as
an expression.
 Error: BC30287 - line 74 (415) - '.' expected.
 Error: BC30108 - line 75 (416) - 'DataSet' is a type and cannot be used as an
expression.
 Error: BC30800 - line 75 (416) - Method arguments must be enclosed in
parentheses.
 Error: BC30451 - line 75 (416) - Name 'lst' is not declared.
 Error: BC30451 - line 75 (416) - Name 'whereClause' is not declared.
 Error: BC30451 - line 77 (418) - Name 'lst' is not declared.
 ** Compile Failed. **




________________________________
From: Jose Gomez <jose@...>
To: vantage@yahoogroups.com
Sent: Mon, 27 September, 2010 16:54:55
Subject: Re: [Vantage] Re: Auto Fill

Just replace the where Clause with something like shown below. For Using
Description

String whereClause ="Part.PartNum MATCHES('"+epiUltraComboC1.Text+"*') OR
Part.PartDescription MATCHES ('"+epiUltraComboC1.Text+"*')";

DataSet lst = read.GetList("Part",whereClause
,"PartNum,PartDescription,ClassID,UnitPrice");


To show only Manufactured parts just modify the query again to looking at
whatever field that tells you its manufactured.. how do you know when a part
is manufactured???
If you tell me what you look at , I can give you the right query. However
keep in mind that if the field is outside of th Part table then you are
pretty much out of luck

Sincerely
Jose C Gomez

http://www.josecgomez.com


On Mon, Sep 27, 2010 at 11:37 AM, Jose Gomez <jose@...> wrote:

> If you look in the original thread? (Which BTW why did you all create
> another one??) you shoulkd see the code for using Description, you can also
> modify the query to include only manufactured parts the same way.
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
>
>
> On Mon, Sep 27, 2010 at 11:11 AM, Chris Thompson
><chriselectrix@...>wrote:
>
>>
>>
>> Hi
>>
>> Ive finally got it working.
>>
>> Do you know if there is any way that it can be customised even further to
>> only
>> include 'manufactured' parts in the available parts that can be selected,
>> rather
>> than displaying all parts?
>>
>> Also what do I need to do to my code to allow it to search on Description
>> as
>> well as Part Number?
>>
>> I can see this code coming in useful all over!!
>>
>> Thanks,
>>
>> CHRIS
>>
>>
>> ________________________________
>> From: Dan Sirow <dansirow@... <dansirow%40iccparts.com>>
>> To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
>>
>> Sent: Mon, 27 September, 2010 15:49:11
>> Subject: [Vantage] Re: Auto Fill
>>
>>
>>
>> Use the wizards to create the event code.
>>
>> Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
>> Custom
>> Control is epiUltraCombo2(matching your code), Available Controls pick
>> both Key
>> Press and Key UP, then update all event code. In the event code that is
>> created,
>> enter code like:
>> If EpiUltraComboC2.Text.Length > 3 Then PartSearch
>>
>> This was the 1st time I used the event wizard, really cool stuff!
>>
>> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com>, Chris
>> Thompson <chriselectrix@...> wrote:
>> >
>> > This is what I have so far - what else do I need to do to get it to
>> work??
>> >
>> > '//**************************************************
>> > '// Custom VB.NET code for SalesOrderForm
>> > '// Created: 27/09/2010 13:15:44
>> > '//**************************************************
>> > Imports System
>> > Imports System.Data
>> > Imports System.Diagnostics
>> > Imports System.Windows.Forms
>> > Imports System.ComponentModel
>> > Imports Microsoft.VisualBasic
>> > Imports Epicor.Mfg.Lib
>> > Imports Epicor.Mfg.UI
>> > Imports Epicor.Mfg.UI.FrameWork
>> > Imports Epicor.Mfg.UI.ExtendedProps
>> > Imports Epicor.Mfg.UI.FormFunctions
>> > Imports Epicor.Mfg.UI.Customization
>> > Imports Epicor.Mfg.UI.Adapters
>> > Imports Epicor.Mfg.UI.Searches
>> > Imports Epicor.Mfg.BO
>> >
>> > Module Script
>> >
>> > Â '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added
>> Module
>>
>> > Level Variables' Comments! **
>> >
>> > Â '// Begin Wizard Added Module Level Variables **
>> > Â '// End Wizard Added Module Level Variables **
>> >
>> > Â '// Add Custom Module Level Variables Here **
>> >    Private read as BOReader = nothing
>> >    '//Private rdr As Epicor.Mfg.Lib.BOReader
>> >
>> > Â Sub InitializeCustomCode()
>> >    read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>> > Â Â '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
>> Added
>> >Variable
>> >
>> > Initialization' lines **
>> >
>> > Â Â '// Begin Wizard Added Variable Initialization
>> > Â Â '// End Wizard Added Variable Initialization
>> > Â Â '// Begin Wizard Added Custom Method Calls
>> > Â Â '// End Wizard Added Custom Method Calls
>> > Â Â Â Â Â Â Â
>> > Â End Sub
>> > Â Â Â Â Â
>> > Â Sub DestroyCustomCode()
>> >
>> > Â Â '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
>> Added
>> >Object
>> >
>> > Disposal' lines **
>> >
>> > Â Â '// Begin Wizard Added Object Disposal
>> > Â Â '// End Wizard Added Object Disposal
>> > Â Â '// Begin Custom Code Disposal
>> > Â Â '// End Custom Code Disposal
>> > Â End Sub
>> >    Private Sub PartSearch()
>> >    Dim lst As DataSet = read.GetList("Part", "Part.PartNum
>> MATCHES('" +
>> > epiUltraComboC2.Text &
>> "*')","PartNum,PartDescription,ClassID,UnitPrice")
>> >    epiUltraComboC2.DataSource = lst
>> >    epiUltraComboC2.ValueMember = "PartNum"
>> >    epiUltraComboC2.DisplayMember = "PartNum"
>> >    End Sub
>> > End Module
>> >
>> >
>> >
>> >
>> >
>> > ________________________________
>> > From: gmack110256 <genemack@...>
>> > To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
>> > Sent: Mon, 27 September, 2010 13:19:54
>> > Subject: [Vantage] Auto Fill
>> >
>> > Â
>> > I think I got the Imports Epicor Lib. set now.
>> >
>> > Below is the syntax I have in the Script Editor. Everything seems to
>> work
>> >except
>> >
>> > I get the following error.
>> >
>> > Error: BC30289 - line 39 (236) - Statement cannot appear within a method
>> body.
>>
>> > End of method assumed.
>> >
>> > Can anyone tell me what I am Missing.
>> >
>> > Gene
>> >
>> > Sub InitializeCustomCode()
>> >
>> > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>> >
>> >
>> > Private Sub PartSearch()
>> >
>> > Dim whereClause As String
>> >
>> > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
>> >
>> > Dim lst as Dataset =
>> >
>> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > [Non-text portions of this message have been removed]
>> >
>>
>> [Non-text portions of this message have been removed]
>>
>>Â
>>
>
>


[Non-text portions of this message have been removed]



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.%c2%a0

(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links






[Non-text portions of this message have been removed]
Its because you are using VB and I gave you code in C#, it needs to be
translated to VB

Dim WhereClause as String = "Part.PartNum MATCHES('" + epiUltraComboC2.Text
& "*')"
OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
Dim lst as DataSet
= read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")





Sincerely
Jose C Gomez

http://www.josecgomez.com


On Tue, Sep 28, 2010 at 7:52 AM, Chris Thompson <chriselectrix@...>wrote:

>
>
> Hi Jose
>
> This is what I have ...
>
>
> '//**************************************************
> '// Custom VB.NET code for SalesOrderForm
> '// Created: 27/09/2010 13:15:44
> '//**************************************************
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows.Forms
> Imports System.ComponentModel
> Imports Microsoft.VisualBasic
> Imports Epicor.Mfg.Lib
> Imports Epicor.Mfg.UI
> Imports Epicor.Mfg.UI.FrameWork
> Imports Epicor.Mfg.UI.ExtendedProps
> Imports Epicor.Mfg.UI.FormFunctions
> Imports Epicor.Mfg.UI.Customization
> Imports Epicor.Mfg.UI.Adapters
> Imports Epicor.Mfg.UI.Searches
> Imports Epicor.Mfg.BO
>
> Module Script
>
> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added
> Module
> Level Variables' Comments! **
>
> '// Begin Wizard Added Module Level Variables **
> '// End Wizard Added Module Level Variables **
>
> '// Add Custom Module Level Variables Here **
> Private read as BOReader = nothing
> '//Private rdr As Epicor.Mfg.Lib.BOReader
>
> Sub InitializeCustomCode()
> read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
> Variable
> Initialization' lines **
>
> '// Begin Wizard Added Variable Initialization
> '// End Wizard Added Variable Initialization
> '// Begin Wizard Added Custom Method Calls
> AddHandler epiUltraComboC2.KeyPress, AddressOf
> Script.epiUltraComboC2_KeyPress
> AddHandler epiUltraComboC2.KeyUp, AddressOf Script.epiUltraComboC2_KeyUp
> '// End Wizard Added Custom Method Calls
>
> End Sub
>
> Sub DestroyCustomCode()
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
> Object
> Disposal' lines **
>
> '// Begin Wizard Added Object Disposal
> RemoveHandler epiUltraComboC2.KeyPress, AddressOf
> Script.epiUltraComboC2_KeyPress
> RemoveHandler epiUltraComboC2.KeyUp, AddressOf
> Script.epiUltraComboC2_KeyUp
> '// End Wizard Added Object Disposal
> '// Begin Custom Code Disposal
> '// End Custom Code Disposal
> End Sub
> Private Sub PartSearch()
> '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
> +
> epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
> '// String whereClause = ("Part.PartNum MATCHES('" +
> epiUltraComboC2.Text &
> "*') OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*'))
> '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
> +
> epiUltraComboC2.Text & "*')" OR "Part.Description MATCHES('" +
> epiUltraComboC2.Text & "*')", "PartNum,Description,ClassID,UnitPrice")
>
>
> String WhereClause = "Part.PartNum MATCHES('" + epiUltraComboC2.Text &
> "*')"
> OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
> DataSet lst =
> read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")
>
>
> epiUltraComboC2.DataSource = lst
> epiUltraComboC2.ValueMember = "PartNum"
> epiUltraComboC2.DisplayMember = "PartNum"
> End Sub
> Private Sub epiUltraComboC2_KeyPress(ByVal sender As Object, ByVal args As
>
> System.Windows.Forms.KeyPressEventArgs)
> ' ** Place Event Handling Code Here **
> If EpiUltraComboC2.Text.Length > 2 Then PartSearch
> End Sub
>
> Private Sub epiUltraComboC2_KeyUp(ByVal sender As Object, ByVal args As
> System.Windows.Forms.KeyEventArgs)
> ' ** Place Event Handling Code Here **
> If EpiUltraComboC2.Text.Length > 2 Then PartSearch
> End Sub
>
> End Module
>
> And this is the compile errors I am getting ...
>
> Compiling Custom Code ...
>
> ----------errors------------
> Error: BC30109 - line 74 (415) - 'String' is a class type and cannot be
> used as
> an expression.
> Error: BC30287 - line 74 (415) - '.' expected.
> Error: BC30108 - line 75 (416) - 'DataSet' is a type and cannot be used as
> an
> expression.
> Error: BC30800 - line 75 (416) - Method arguments must be enclosed in
> parentheses.
> Error: BC30451 - line 75 (416) - Name 'lst' is not declared.
> Error: BC30451 - line 75 (416) - Name 'whereClause' is not declared.
> Error: BC30451 - line 77 (418) - Name 'lst' is not declared.
> ** Compile Failed. **
>
> ________________________________
> From: Jose Gomez <jose@... <jose%40josecgomez.com>>
> To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
>
> Sent: Mon, 27 September, 2010 16:54:55
> Subject: Re: [Vantage] Re: Auto Fill
>
> Just replace the where Clause with something like shown below. For Using
> Description
>
> String whereClause ="Part.PartNum MATCHES('"+epiUltraComboC1.Text+"*') OR
> Part.PartDescription MATCHES ('"+epiUltraComboC1.Text+"*')";
>
> DataSet lst = read.GetList("Part",whereClause
> ,"PartNum,PartDescription,ClassID,UnitPrice");
>
> To show only Manufactured parts just modify the query again to looking at
> whatever field that tells you its manufactured.. how do you know when a
> part
> is manufactured???
> If you tell me what you look at , I can give you the right query. However
> keep in mind that if the field is outside of th Part table then you are
> pretty much out of luck
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
> On Mon, Sep 27, 2010 at 11:37 AM, Jose Gomez <jose@...<jose%40josecgomez.com>>
> wrote:
>
> > If you look in the original thread? (Which BTW why did you all create
> > another one??) you shoulkd see the code for using Description, you can
> also
> > modify the query to include only manufactured parts the same way.
> > Sincerely
> > Jose C Gomez
> >
> > http://www.josecgomez.com
> >
> >
> >
> > On Mon, Sep 27, 2010 at 11:11 AM, Chris Thompson
> ><chriselectrix@... <chriselectrix%40ymail.com>>wrote:
> >
> >>
> >>
> >> Hi
> >>
> >> Ive finally got it working.
> >>
> >> Do you know if there is any way that it can be customised even further
> to
> >> only
> >> include 'manufactured' parts in the available parts that can be
> selected,
> >> rather
> >> than displaying all parts?
> >>
> >> Also what do I need to do to my code to allow it to search on
> Description
> >> as
> >> well as Part Number?
> >>
> >> I can see this code coming in useful all over!!
> >>
> >> Thanks,
> >>
> >> CHRIS
> >>
> >>
> >> ________________________________
> >> From: Dan Sirow <dansirow@... <dansirow%40iccparts.com><dansirow%
> 40iccparts.com>>
> >> To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> 40yahoogroups.com>
>
> >>
> >> Sent: Mon, 27 September, 2010 15:49:11
> >> Subject: [Vantage] Re: Auto Fill
> >>
> >>
> >>
> >> Use the wizards to create the event code.
> >>
> >> Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
> >> Custom
> >> Control is epiUltraCombo2(matching your code), Available Controls pick
> >> both Key
> >> Press and Key UP, then update all event code. In the event code that is
> >> created,
> >> enter code like:
> >> If EpiUltraComboC2.Text.Length > 3 Then PartSearch
> >>
> >> This was the 1st time I used the event wizard, really cool stuff!
> >>
> >> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> 40yahoogroups.com>, Chris
>
> >> Thompson <chriselectrix@...> wrote:
> >> >
> >> > This is what I have so far - what else do I need to do to get it to
> >> work??
> >> >
> >> > '//**************************************************
> >> > '// Custom VB.NET code for SalesOrderForm
> >> > '// Created: 27/09/2010 13:15:44
> >> > '//**************************************************
> >> > Imports System
> >> > Imports System.Data
> >> > Imports System.Diagnostics
> >> > Imports System.Windows.Forms
> >> > Imports System.ComponentModel
> >> > Imports Microsoft.VisualBasic
> >> > Imports Epicor.Mfg.Lib
> >> > Imports Epicor.Mfg.UI
> >> > Imports Epicor.Mfg.UI.FrameWork
> >> > Imports Epicor.Mfg.UI.ExtendedProps
> >> > Imports Epicor.Mfg.UI.FormFunctions
> >> > Imports Epicor.Mfg.UI.Customization
> >> > Imports Epicor.Mfg.UI.Adapters
> >> > Imports Epicor.Mfg.UI.Searches
> >> > Imports Epicor.Mfg.BO
> >> >
> >> > Module Script
> >> >
> >> > � '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard
> Added
> >> Module
> >>
> >> > Level Variables' Comments! **
> >> >
> >> > � '// Begin Wizard Added Module Level Variables **
> >> > � '// End Wizard Added Module Level Variables **
> >> >
> >> > � '// Add Custom Module Level Variables Here **
> >> > � � � Private read as BOReader = nothing
> >> > � � � '//Private rdr As Epicor.Mfg.Lib.BOReader
> >> >
> >> > � Sub InitializeCustomCode()
> >> > � � � read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >> > � � '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> >> Added
> >> >Variable
> >> >
> >> > Initialization' lines **
> >> >
> >> > � � '// Begin Wizard Added Variable Initialization
> >> > � � '// End Wizard Added Variable Initialization
> >> > � � '// Begin Wizard Added Custom Method Calls
> >> > � � '// End Wizard Added Custom Method Calls
> >> > � � � � � � �
> >> > � End Sub
> >> > � � � � �
> >> > � Sub DestroyCustomCode()
> >> >
> >> > � � '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> >> Added
> >> >Object
> >> >
> >> > Disposal' lines **
> >> >
> >> > � � '// Begin Wizard Added Object Disposal
> >> > � � '// End Wizard Added Object Disposal
> >> > � � '// Begin Custom Code Disposal
> >> > � � '// End Custom Code Disposal
> >> > � End Sub
> >> > � � � Private Sub PartSearch()
> >> > � � � Dim lst As DataSet = read.GetList("Part", "Part.PartNum
> >> MATCHES('" +
> >> > epiUltraComboC2.Text &
> >> "*')","PartNum,PartDescription,ClassID,UnitPrice")
> >> > � � � epiUltraComboC2.DataSource = lst
> >> > � � � epiUltraComboC2.ValueMember = "PartNum"
> >> > � � � epiUltraComboC2.DisplayMember = "PartNum"
> >> > � � � End Sub
> >> > End Module
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > ________________________________
> >> > From: gmack110256 <genemack@...>
> >> > To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> 40yahoogroups.com>
>
> >> > Sent: Mon, 27 September, 2010 13:19:54
> >> > Subject: [Vantage] Auto Fill
> >> >
> >> > �
> >> > I think I got the Imports Epicor Lib. set now.
> >> >
> >> > Below is the syntax I have in the Script Editor. Everything seems to
> >> work
> >> >except
> >> >
> >> > I get the following error.
> >> >
> >> > Error: BC30289 - line 39 (236) - Statement cannot appear within a
> method
> >> body.
> >>
> >> > End of method assumed.
> >> >
> >> > Can anyone tell me what I am Missing.
> >> >
> >> > Gene
> >> >
> >> > Sub InitializeCustomCode()
> >> >
> >> > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >> >
> >> >
> >> > Private Sub PartSearch()
> >> >
> >> > Dim whereClause As String
> >> >
> >> > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
> >> >
> >> > Dim lst as Dataset =
> >> >
> >>
> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > [Non-text portions of this message have been removed]
> >> >
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >>
> >>
> >
> >
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
>
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
>
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]
Hi Jose

When I test it, I get the following error "Conversion from string "Part.PartNum
MATCHES('tce*')" to type 'Long' is not valid."

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.InvalidCastException: Conversion from string "Part.PartNum
MATCHES('tce*')" to type 'Long' is not valid. ---> System.FormatException: Input
string was not in a correct format.
  at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDecimal(String
Value, NumberFormatInfo NumberFormat)
  at Microsoft.VisualBasic.CompilerServices.Conversions.ToLong(String Value)
  --- End of inner exception stack trace ---
  at Microsoft.VisualBasic.CompilerServices.Conversions.ToLong(String Value)
  at Script.PartSearch()
  at Script.epiUltraComboC2_KeyUp(Object sender, KeyEventArgs args)
  at System.Windows.Forms.Control.OnKeyUp(KeyEventArgs e)
  at Epicor.Mfg.UI.FrameWork.EpiUltraCombo.OnKeyUp(KeyEventArgs e)
  at Infragistics.Win.UltraWinGrid.UltraCombo.OnEditorKeyUp(Object sender,
KeyEventArgs args)
  at Infragistics.Win.EmbeddableEditorBase.RaiseKeyUpEvent(KeyEventArgs e)
  at Infragistics.Win.EmbeddableTextBox.OnKeyUp(KeyEventArgs e)
  at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
  at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
  at
Infragistics.Win.EmbeddableTextBoxWithUIPermissions.ProcessKeyMessage(Message&
msg)
  at System.Windows.Forms.Control.WmKeyChar(Message& m)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
  at System.Windows.Forms.TextBox.WndProc(Message& m)
  at Infragistics.Win.EmbeddableTextBoxWithUIPermissions.WndProc(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)





________________________________
From: Jose Gomez <jose@...>
To: vantage@yahoogroups.com
Sent: Tue, 28 September, 2010 13:06:47
Subject: Re: [Vantage] Re: Auto Fill

Its because you are using VB and I gave you code in C#, it needs to be
translated to VB

Dim WhereClause as String = "Part.PartNum MATCHES('" + epiUltraComboC2.Text
& "*')"
OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
 Dim lst as DataSet
= read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")





Sincerely
Jose C Gomez

http://www.josecgomez.com


On Tue, Sep 28, 2010 at 7:52 AM, Chris Thompson <chriselectrix@...>wrote:

>
>
> Hi Jose
>
> This is what I have ...
>
>
> '//**************************************************
> '// Custom VB.NET code for SalesOrderForm
> '// Created: 27/09/2010 13:15:44
> '//**************************************************
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows.Forms
> Imports System.ComponentModel
> Imports Microsoft.VisualBasic
> Imports Epicor.Mfg.Lib
> Imports Epicor.Mfg.UI
> Imports Epicor.Mfg.UI.FrameWork
> Imports Epicor.Mfg.UI.ExtendedProps
> Imports Epicor.Mfg.UI.FormFunctions
> Imports Epicor.Mfg.UI.Customization
> Imports Epicor.Mfg.UI.Adapters
> Imports Epicor.Mfg.UI.Searches
> Imports Epicor.Mfg.BO
>
> Module Script
>
>Â '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added
> Module
> Level Variables' Comments! **
>
>Â '// Begin Wizard Added Module Level Variables **
>Â '// End Wizard Added Module Level Variables **
>
>Â '// Add Custom Module Level Variables Here **
>Â Â Private read as BOReader = nothing
>Â Â '//Private rdr As Epicor.Mfg.Lib.BOReader
>
>Â Sub InitializeCustomCode()
>Â Â read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>Â '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
> Variable
> Initialization' lines **
>
>Â '// Begin Wizard Added Variable Initialization
>Â '// End Wizard Added Variable Initialization
>Â '// Begin Wizard Added Custom Method Calls
>Â AddHandler epiUltraComboC2.KeyPress, AddressOf
> Script.epiUltraComboC2_KeyPress
>Â AddHandler epiUltraComboC2.KeyUp, AddressOf Script.epiUltraComboC2_KeyUp
>Â '// End Wizard Added Custom Method Calls
>
>Â End Sub
>
>Â Sub DestroyCustomCode()
>
>Â '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
> Object
> Disposal' lines **
>
>Â '// Begin Wizard Added Object Disposal
>Â RemoveHandler epiUltraComboC2.KeyPress, AddressOf
> Script.epiUltraComboC2_KeyPress
>Â RemoveHandler epiUltraComboC2.KeyUp, AddressOf
> Script.epiUltraComboC2_KeyUp
>Â '// End Wizard Added Object Disposal
>Â '// Begin Custom Code Disposal
>Â '// End Custom Code Disposal
>Â End Sub
>Â Â Private Sub PartSearch()
>Â Â '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
> +
> epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
>Â Â '// String whereClause = ("Part.PartNum MATCHES('" +
> epiUltraComboC2.Text &
> "*') OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*'))
>Â Â '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
> +
> epiUltraComboC2.Text & "*')" OR "Part.Description MATCHES('" +
> epiUltraComboC2.Text & "*')", "PartNum,Description,ClassID,UnitPrice")
>
>
>Â Â String WhereClause = "Part.PartNum MATCHES('" + epiUltraComboC2.Text &
> "*')"
> OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
>Â Â DataSet lst =
> read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")
>
>
>Â Â epiUltraComboC2.DataSource = lst
>Â Â epiUltraComboC2.ValueMember = "PartNum"
>Â Â epiUltraComboC2.DisplayMember = "PartNum"
>Â Â End Sub
>Â Private Sub epiUltraComboC2_KeyPress(ByVal sender As Object, ByVal args As
>
> System.Windows.Forms.KeyPressEventArgs)
>Â ' ** Place Event Handling Code Here **
>Â Â Â Â If EpiUltraComboC2.Text.Length > 2 Then PartSearch
>Â End Sub
>
>Â Private Sub epiUltraComboC2_KeyUp(ByVal sender As Object, ByVal args As
> System.Windows.Forms.KeyEventArgs)
>Â ' ** Place Event Handling Code Here **
>Â Â Â Â If EpiUltraComboC2.Text.Length > 2 Then PartSearch
>Â End Sub
>
> End Module
>
> And this is the compile errors I am getting ...
>
> Compiling Custom Code ...
>
> ----------errors------------
>Â Error: BC30109 - line 74 (415) - 'String' is a class type and cannot be
> used as
> an expression.
>Â Error: BC30287 - line 74 (415) - '.' expected.
>Â Error: BC30108 - line 75 (416) - 'DataSet' is a type and cannot be used as
> an
> expression.
>Â Error: BC30800 - line 75 (416) - Method arguments must be enclosed in
> parentheses.
>Â Error: BC30451 - line 75 (416) - Name 'lst' is not declared.
>Â Error: BC30451 - line 75 (416) - Name 'whereClause' is not declared.
>Â Error: BC30451 - line 77 (418) - Name 'lst' is not declared.
>Â ** Compile Failed. **
>
> ________________________________
> From: Jose Gomez <jose@... <jose%40josecgomez.com>>
> To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
>
> Sent: Mon, 27 September, 2010 16:54:55
> Subject: Re: [Vantage] Re: Auto Fill
>
> Just replace the where Clause with something like shown below. For Using
> Description
>
> String whereClause ="Part.PartNum MATCHES('"+epiUltraComboC1.Text+"*') OR
> Part.PartDescription MATCHES ('"+epiUltraComboC1.Text+"*')";
>
> DataSet lst = read.GetList("Part",whereClause
> ,"PartNum,PartDescription,ClassID,UnitPrice");
>
> To show only Manufactured parts just modify the query again to looking at
> whatever field that tells you its manufactured.. how do you know when a
> part
> is manufactured???
> If you tell me what you look at , I can give you the right query. However
> keep in mind that if the field is outside of th Part table then you are
> pretty much out of luck
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
> On Mon, Sep 27, 2010 at 11:37 AM, Jose Gomez
><jose@...<jose%40josecgomez.com>>
> wrote:
>
> > If you look in the original thread? (Which BTW why did you all create
> > another one??) you shoulkd see the code for using Description, you can
> also
> > modify the query to include only manufactured parts the same way.
> > Sincerely
> > Jose C Gomez
> >
> > http://www.josecgomez.com
> >
> >
> >
> > On Mon, Sep 27, 2010 at 11:11 AM, Chris Thompson
> ><chriselectrix@... <chriselectrix%40ymail.com>>wrote:
> >
> >>
> >>
> >> Hi
> >>
> >> Ive finally got it working.
> >>
> >> Do you know if there is any way that it can be customised even further
> to
> >> only
> >> include 'manufactured' parts in the available parts that can be
> selected,
> >> rather
> >> than displaying all parts?
> >>
> >> Also what do I need to do to my code to allow it to search on
> Description
> >> as
> >> well as Part Number?
> >>
> >> I can see this code coming in useful all over!!
> >>
> >> Thanks,
> >>
> >> CHRIS
> >>
> >>
> >> ________________________________
> >> From: Dan Sirow <dansirow@... <dansirow%40iccparts.com><dansirow%
> 40iccparts.com>>
> >> To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> 40yahoogroups.com>
>
> >>
> >> Sent: Mon, 27 September, 2010 15:49:11
> >> Subject: [Vantage] Re: Auto Fill
> >>
> >>
> >>
> >> Use the wizards to create the event code.
> >>
> >> Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
> >> Custom
> >> Control is epiUltraCombo2(matching your code), Available Controls pick
> >> both Key
> >> Press and Key UP, then update all event code. In the event code that is
> >> created,
> >> enter code like:
> >> If EpiUltraComboC2.Text.Length > 3 Then PartSearch
> >>
> >> This was the 1st time I used the event wizard, really cool stuff!
> >>
> >> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> 40yahoogroups.com>, Chris
>
> >> Thompson <chriselectrix@...> wrote:
> >> >
> >> > This is what I have so far - what else do I need to do to get it to
> >> work??
> >> >
> >> > '//**************************************************
> >> > '// Custom VB.NET code for SalesOrderForm
> >> > '// Created: 27/09/2010 13:15:44
> >> > '//**************************************************
> >> > Imports System
> >> > Imports System.Data
> >> > Imports System.Diagnostics
> >> > Imports System.Windows.Forms
> >> > Imports System.ComponentModel
> >> > Imports Microsoft.VisualBasic
> >> > Imports Epicor.Mfg.Lib
> >> > Imports Epicor.Mfg.UI
> >> > Imports Epicor.Mfg.UI.FrameWork
> >> > Imports Epicor.Mfg.UI.ExtendedProps
> >> > Imports Epicor.Mfg.UI.FormFunctions
> >> > Imports Epicor.Mfg.UI.Customization
> >> > Imports Epicor.Mfg.UI.Adapters
> >> > Imports Epicor.Mfg.UI.Searches
> >> > Imports Epicor.Mfg.BO
> >> >
> >> > Module Script
> >> >
> >> > Â '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard
> Added
> >> Module
> >>
> >> > Level Variables' Comments! **
> >> >
> >> > Â '// Begin Wizard Added Module Level Variables **
> >> > Â '// End Wizard Added Module Level Variables **
> >> >
> >> > Â '// Add Custom Module Level Variables Here **
> >> >    Private read as BOReader = nothing
> >> >    '//Private rdr As Epicor.Mfg.Lib.BOReader
> >> >
> >> > Â Sub InitializeCustomCode()
> >> >    read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >> > Â Â '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> >> Added
> >> >Variable
> >> >
> >> > Initialization' lines **
> >> >
> >> > Â Â '// Begin Wizard Added Variable Initialization
> >> > Â Â '// End Wizard Added Variable Initialization
> >> > Â Â '// Begin Wizard Added Custom Method Calls
> >> > Â Â '// End Wizard Added Custom Method Calls
> >> > Â Â Â Â Â Â Â
> >> > Â End Sub
> >> > Â Â Â Â Â
> >> > Â Sub DestroyCustomCode()
> >> >
> >> > Â Â '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> >> Added
> >> >Object
> >> >
> >> > Disposal' lines **
> >> >
> >> > Â Â '// Begin Wizard Added Object Disposal
> >> > Â Â '// End Wizard Added Object Disposal
> >> > Â Â '// Begin Custom Code Disposal
> >> > Â Â '// End Custom Code Disposal
> >> > Â End Sub
> >> >    Private Sub PartSearch()
> >> >    Dim lst As DataSet = read.GetList("Part", "Part.PartNum
> >> MATCHES('" +
> >> > epiUltraComboC2.Text &
> >> "*')","PartNum,PartDescription,ClassID,UnitPrice")
> >> >    epiUltraComboC2.DataSource = lst
> >> >    epiUltraComboC2.ValueMember = "PartNum"
> >> >    epiUltraComboC2.DisplayMember = "PartNum"
> >> >    End Sub
> >> > End Module
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > ________________________________
> >> > From: gmack110256 <genemack@...>
> >> > To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> 40yahoogroups.com>
>
> >> > Sent: Mon, 27 September, 2010 13:19:54
> >> > Subject: [Vantage] Auto Fill
> >> >
> >> > Â
> >> > I think I got the Imports Epicor Lib. set now.
> >> >
> >> > Below is the syntax I have in the Script Editor. Everything seems to
> >> work
> >> >except
> >> >
> >> > I get the following error.
> >> >
> >> > Error: BC30289 - line 39 (236) - Statement cannot appear within a
> method
> >> body.
> >>
> >> > End of method assumed.
> >> >
> >> > Can anyone tell me what I am Missing.
> >> >
> >> > Gene
> >> >
> >> > Sub InitializeCustomCode()
> >> >
> >> > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >> >
> >> >
> >> > Private Sub PartSearch()
> >> >
> >> > Dim whereClause As String
> >> >
> >> > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
> >> >
> >> > Dim lst as Dataset =
> >> >
> >>
> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > [Non-text portions of this message have been removed]
> >> >
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >>
> >>
> >
> >
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have
>
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
>
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
>
> [Non-text portions of this message have been removed]
>

>


[Non-text portions of this message have been removed]



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.%c2%a0

(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links






[Non-text portions of this message have been removed]
Replace + signs with & for VB

Sincerely
Jose C Gomez

http://www.josecgomez.com


On Tue, Sep 28, 2010 at 8:06 AM, Jose Gomez <jose@...> wrote:

> Its because you are using VB and I gave you code in C#, it needs to be
> translated to VB
>
> Dim WhereClause as String = "Part.PartNum MATCHES('" + epiUltraComboC2.Text
> & "*')"
>
> OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
> Dim lst as DataSet
> = read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")
>
>
>
>
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
>
> On Tue, Sep 28, 2010 at 7:52 AM, Chris Thompson <chriselectrix@...>wrote:
>
>>
>>
>> Hi Jose
>>
>> This is what I have ...
>>
>>
>> '//**************************************************
>> '// Custom VB.NET code for SalesOrderForm
>> '// Created: 27/09/2010 13:15:44
>> '//**************************************************
>> Imports System
>> Imports System.Data
>> Imports System.Diagnostics
>> Imports System.Windows.Forms
>> Imports System.ComponentModel
>> Imports Microsoft.VisualBasic
>> Imports Epicor.Mfg.Lib
>> Imports Epicor.Mfg.UI
>> Imports Epicor.Mfg.UI.FrameWork
>> Imports Epicor.Mfg.UI.ExtendedProps
>> Imports Epicor.Mfg.UI.FormFunctions
>> Imports Epicor.Mfg.UI.Customization
>> Imports Epicor.Mfg.UI.Adapters
>> Imports Epicor.Mfg.UI.Searches
>> Imports Epicor.Mfg.BO
>>
>> Module Script
>>
>> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added
>> Module
>> Level Variables' Comments! **
>>
>> '// Begin Wizard Added Module Level Variables **
>> '// End Wizard Added Module Level Variables **
>>
>> '// Add Custom Module Level Variables Here **
>> Private read as BOReader = nothing
>> '//Private rdr As Epicor.Mfg.Lib.BOReader
>>
>> Sub InitializeCustomCode()
>> read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
>> Variable
>> Initialization' lines **
>>
>> '// Begin Wizard Added Variable Initialization
>> '// End Wizard Added Variable Initialization
>> '// Begin Wizard Added Custom Method Calls
>> AddHandler epiUltraComboC2.KeyPress, AddressOf
>> Script.epiUltraComboC2_KeyPress
>> AddHandler epiUltraComboC2.KeyUp, AddressOf Script.epiUltraComboC2_KeyUp
>> '// End Wizard Added Custom Method Calls
>>
>> End Sub
>>
>> Sub DestroyCustomCode()
>>
>> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
>> Object
>> Disposal' lines **
>>
>> '// Begin Wizard Added Object Disposal
>> RemoveHandler epiUltraComboC2.KeyPress, AddressOf
>> Script.epiUltraComboC2_KeyPress
>> RemoveHandler epiUltraComboC2.KeyUp, AddressOf
>> Script.epiUltraComboC2_KeyUp
>> '// End Wizard Added Object Disposal
>> '// Begin Custom Code Disposal
>> '// End Custom Code Disposal
>> End Sub
>> Private Sub PartSearch()
>> '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
>> +
>> epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
>> '// String whereClause = ("Part.PartNum MATCHES('" +
>> epiUltraComboC2.Text &
>> "*') OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*'))
>> '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
>> +
>> epiUltraComboC2.Text & "*')" OR "Part.Description MATCHES('" +
>> epiUltraComboC2.Text & "*')", "PartNum,Description,ClassID,UnitPrice")
>>
>>
>> String WhereClause = "Part.PartNum MATCHES('" + epiUltraComboC2.Text &
>> "*')"
>> OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
>> DataSet lst =
>> read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")
>>
>>
>> epiUltraComboC2.DataSource = lst
>> epiUltraComboC2.ValueMember = "PartNum"
>> epiUltraComboC2.DisplayMember = "PartNum"
>> End Sub
>> Private Sub epiUltraComboC2_KeyPress(ByVal sender As Object, ByVal args
>> As
>> System.Windows.Forms.KeyPressEventArgs)
>> ' ** Place Event Handling Code Here **
>> If EpiUltraComboC2.Text.Length > 2 Then PartSearch
>> End Sub
>>
>> Private Sub epiUltraComboC2_KeyUp(ByVal sender As Object, ByVal args As
>> System.Windows.Forms.KeyEventArgs)
>> ' ** Place Event Handling Code Here **
>> If EpiUltraComboC2.Text.Length > 2 Then PartSearch
>> End Sub
>>
>> End Module
>>
>> And this is the compile errors I am getting ...
>>
>> Compiling Custom Code ...
>>
>> ----------errors------------
>> Error: BC30109 - line 74 (415) - 'String' is a class type and cannot be
>> used as
>> an expression.
>> Error: BC30287 - line 74 (415) - '.' expected.
>> Error: BC30108 - line 75 (416) - 'DataSet' is a type and cannot be used
>> as an
>> expression.
>> Error: BC30800 - line 75 (416) - Method arguments must be enclosed in
>> parentheses.
>> Error: BC30451 - line 75 (416) - Name 'lst' is not declared.
>> Error: BC30451 - line 75 (416) - Name 'whereClause' is not declared.
>> Error: BC30451 - line 77 (418) - Name 'lst' is not declared.
>> ** Compile Failed. **
>>
>> ________________________________
>> From: Jose Gomez <jose@... <jose%40josecgomez.com>>
>> To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
>>
>> Sent: Mon, 27 September, 2010 16:54:55
>> Subject: Re: [Vantage] Re: Auto Fill
>>
>> Just replace the where Clause with something like shown below. For Using
>> Description
>>
>> String whereClause ="Part.PartNum MATCHES('"+epiUltraComboC1.Text+"*') OR
>> Part.PartDescription MATCHES ('"+epiUltraComboC1.Text+"*')";
>>
>> DataSet lst = read.GetList("Part",whereClause
>> ,"PartNum,PartDescription,ClassID,UnitPrice");
>>
>> To show only Manufactured parts just modify the query again to looking at
>> whatever field that tells you its manufactured.. how do you know when a
>> part
>> is manufactured???
>> If you tell me what you look at , I can give you the right query. However
>> keep in mind that if the field is outside of th Part table then you are
>> pretty much out of luck
>>
>> Sincerely
>> Jose C Gomez
>>
>> http://www.josecgomez.com
>>
>> On Mon, Sep 27, 2010 at 11:37 AM, Jose Gomez <jose@...<jose%40josecgomez.com>>
>> wrote:
>>
>> > If you look in the original thread? (Which BTW why did you all create
>> > another one??) you shoulkd see the code for using Description, you can
>> also
>> > modify the query to include only manufactured parts the same way.
>> > Sincerely
>> > Jose C Gomez
>> >
>> > http://www.josecgomez.com
>> >
>> >
>> >
>> > On Mon, Sep 27, 2010 at 11:11 AM, Chris Thompson
>> ><chriselectrix@... <chriselectrix%40ymail.com>>wrote:
>> >
>> >>
>> >>
>> >> Hi
>> >>
>> >> Ive finally got it working.
>> >>
>> >> Do you know if there is any way that it can be customised even further
>> to
>> >> only
>> >> include 'manufactured' parts in the available parts that can be
>> selected,
>> >> rather
>> >> than displaying all parts?
>> >>
>> >> Also what do I need to do to my code to allow it to search on
>> Description
>> >> as
>> >> well as Part Number?
>> >>
>> >> I can see this code coming in useful all over!!
>> >>
>> >> Thanks,
>> >>
>> >> CHRIS
>> >>
>> >>
>> >> ________________________________
>> >> From: Dan Sirow <dansirow@... <dansirow%40iccparts.com><dansirow%
>> 40iccparts.com>>
>> >> To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
>> 40yahoogroups.com>
>>
>> >>
>> >> Sent: Mon, 27 September, 2010 15:49:11
>> >> Subject: [Vantage] Re: Auto Fill
>> >>
>> >>
>> >>
>> >> Use the wizards to create the event code.
>> >>
>> >> Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
>> >> Custom
>> >> Control is epiUltraCombo2(matching your code), Available Controls pick
>> >> both Key
>> >> Press and Key UP, then update all event code. In the event code that is
>> >> created,
>> >> enter code like:
>> >> If EpiUltraComboC2.Text.Length > 3 Then PartSearch
>> >>
>> >> This was the 1st time I used the event wizard, really cool stuff!
>> >>
>> >> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
>> 40yahoogroups.com>, Chris
>>
>> >> Thompson <chriselectrix@...> wrote:
>> >> >
>> >> > This is what I have so far - what else do I need to do to get it to
>> >> work??
>> >> >
>> >> > '//**************************************************
>> >> > '// Custom VB.NET code for SalesOrderForm
>> >> > '// Created: 27/09/2010 13:15:44
>> >> > '//**************************************************
>> >> > Imports System
>> >> > Imports System.Data
>> >> > Imports System.Diagnostics
>> >> > Imports System.Windows.Forms
>> >> > Imports System.ComponentModel
>> >> > Imports Microsoft.VisualBasic
>> >> > Imports Epicor.Mfg.Lib
>> >> > Imports Epicor.Mfg.UI
>> >> > Imports Epicor.Mfg.UI.FrameWork
>> >> > Imports Epicor.Mfg.UI.ExtendedProps
>> >> > Imports Epicor.Mfg.UI.FormFunctions
>> >> > Imports Epicor.Mfg.UI.Customization
>> >> > Imports Epicor.Mfg.UI.Adapters
>> >> > Imports Epicor.Mfg.UI.Searches
>> >> > Imports Epicor.Mfg.BO
>> >> >
>> >> > Module Script
>> >> >
>> >> > � '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard
>> Added
>> >> Module
>> >>
>> >> > Level Variables' Comments! **
>> >> >
>> >> > � '// Begin Wizard Added Module Level Variables **
>> >> > � '// End Wizard Added Module Level Variables **
>> >> >
>> >> > � '// Add Custom Module Level Variables Here **
>> >> > � � � Private read as BOReader = nothing
>> >> > � � � '//Private rdr As Epicor.Mfg.Lib.BOReader
>> >> >
>> >> > � Sub InitializeCustomCode()
>> >> > � � � read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>> >> > � � '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
>> >> Added
>> >> >Variable
>> >> >
>> >> > Initialization' lines **
>> >> >
>> >> > � � '// Begin Wizard Added Variable Initialization
>> >> > � � '// End Wizard Added Variable Initialization
>> >> > � � '// Begin Wizard Added Custom Method Calls
>> >> > � � '// End Wizard Added Custom Method Calls
>> >> > � � � � � � �
>> >> > � End Sub
>> >> > � � � � �
>> >> > � Sub DestroyCustomCode()
>> >> >
>> >> > � � '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
>> >> Added
>> >> >Object
>> >> >
>> >> > Disposal' lines **
>> >> >
>> >> > � � '// Begin Wizard Added Object Disposal
>> >> > � � '// End Wizard Added Object Disposal
>> >> > � � '// Begin Custom Code Disposal
>> >> > � � '// End Custom Code Disposal
>> >> > � End Sub
>> >> > � � � Private Sub PartSearch()
>> >> > � � � Dim lst As DataSet = read.GetList("Part", "Part.PartNum
>> >> MATCHES('" +
>> >> > epiUltraComboC2.Text &
>> >> "*')","PartNum,PartDescription,ClassID,UnitPrice")
>> >> > � � � epiUltraComboC2.DataSource = lst
>> >> > � � � epiUltraComboC2.ValueMember = "PartNum"
>> >> > � � � epiUltraComboC2.DisplayMember = "PartNum"
>> >> > � � � End Sub
>> >> > End Module
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > ________________________________
>> >> > From: gmack110256 <genemack@...>
>> >> > To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
>> 40yahoogroups.com>
>>
>> >> > Sent: Mon, 27 September, 2010 13:19:54
>> >> > Subject: [Vantage] Auto Fill
>> >> >
>> >> > �
>> >> > I think I got the Imports Epicor Lib. set now.
>> >> >
>> >> > Below is the syntax I have in the Script Editor. Everything seems to
>> >> work
>> >> >except
>> >> >
>> >> > I get the following error.
>> >> >
>> >> > Error: BC30289 - line 39 (236) - Statement cannot appear within a
>> method
>> >> body.
>> >>
>> >> > End of method assumed.
>> >> >
>> >> > Can anyone tell me what I am Missing.
>> >> >
>> >> > Gene
>> >> >
>> >> > Sub InitializeCustomCode()
>> >> >
>> >> > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
>> >> >
>> >> >
>> >> > Private Sub PartSearch()
>> >> >
>> >> > Dim whereClause As String
>> >> >
>> >> > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
>> >> >
>> >> > Dim lst as Dataset =
>> >> >
>> >>
>> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > [Non-text portions of this message have been removed]
>> >> >
>> >>
>> >> [Non-text portions of this message have been removed]
>> >>
>> >>
>> >>
>> >
>> >
>>
>> [Non-text portions of this message have been removed]
>>
>> ------------------------------------
>>
>>
>> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
>> have
>> already linked your email address to a yahoo id to enable access. )
>> (1) To access the Files Section of our Yahoo!Group for Report Builder and
>> Crystal Reports and other 'goodies', please goto:
>> http://groups.yahoo.com/group/vantage/files/.
>>
>> (2) To search through old msg's goto:
>> http://groups.yahoo.com/group/vantage/messages
>> (3) To view links to Vendors that provide Vantage services goto:
>> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>>
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>
>


[Non-text portions of this message have been removed]
too many double quotes?

Dim WhereClause as String = "Part.PartNum MATCHES('" + epiUltraComboC2.Text & "*') OR Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"


--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> Replace + signs with & for VB
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
>
> On Tue, Sep 28, 2010 at 8:06 AM, Jose Gomez <jose@...> wrote:
>
> > Its because you are using VB and I gave you code in C#, it needs to be
> > translated to VB
> >
> > Dim WhereClause as String = "Part.PartNum MATCHES('" + epiUltraComboC2.Text
> > & "*')"
> >
> > OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
> > Dim lst as DataSet
> > = read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")
> >
> >
> >
> >
> >
> > Sincerely
> > Jose C Gomez
> >
> > http://www.josecgomez.com
> >
> >
> > On Tue, Sep 28, 2010 at 7:52 AM, Chris Thompson <chriselectrix@...>wrote:
> >
> >>
> >>
> >> Hi Jose
> >>
> >> This is what I have ...
> >>
> >>
> >> '//**************************************************
> >> '// Custom VB.NET code for SalesOrderForm
> >> '// Created: 27/09/2010 13:15:44
> >> '//**************************************************
> >> Imports System
> >> Imports System.Data
> >> Imports System.Diagnostics
> >> Imports System.Windows.Forms
> >> Imports System.ComponentModel
> >> Imports Microsoft.VisualBasic
> >> Imports Epicor.Mfg.Lib
> >> Imports Epicor.Mfg.UI
> >> Imports Epicor.Mfg.UI.FrameWork
> >> Imports Epicor.Mfg.UI.ExtendedProps
> >> Imports Epicor.Mfg.UI.FormFunctions
> >> Imports Epicor.Mfg.UI.Customization
> >> Imports Epicor.Mfg.UI.Adapters
> >> Imports Epicor.Mfg.UI.Searches
> >> Imports Epicor.Mfg.BO
> >>
> >> Module Script
> >>
> >> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added
> >> Module
> >> Level Variables' Comments! **
> >>
> >> '// Begin Wizard Added Module Level Variables **
> >> '// End Wizard Added Module Level Variables **
> >>
> >> '// Add Custom Module Level Variables Here **
> >> Private read as BOReader = nothing
> >> '//Private rdr As Epicor.Mfg.Lib.BOReader
> >>
> >> Sub InitializeCustomCode()
> >> read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
> >> Variable
> >> Initialization' lines **
> >>
> >> '// Begin Wizard Added Variable Initialization
> >> '// End Wizard Added Variable Initialization
> >> '// Begin Wizard Added Custom Method Calls
> >> AddHandler epiUltraComboC2.KeyPress, AddressOf
> >> Script.epiUltraComboC2_KeyPress
> >> AddHandler epiUltraComboC2.KeyUp, AddressOf Script.epiUltraComboC2_KeyUp
> >> '// End Wizard Added Custom Method Calls
> >>
> >> End Sub
> >>
> >> Sub DestroyCustomCode()
> >>
> >> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
> >> Object
> >> Disposal' lines **
> >>
> >> '// Begin Wizard Added Object Disposal
> >> RemoveHandler epiUltraComboC2.KeyPress, AddressOf
> >> Script.epiUltraComboC2_KeyPress
> >> RemoveHandler epiUltraComboC2.KeyUp, AddressOf
> >> Script.epiUltraComboC2_KeyUp
> >> '// End Wizard Added Object Disposal
> >> '// Begin Custom Code Disposal
> >> '// End Custom Code Disposal
> >> End Sub
> >> Private Sub PartSearch()
> >> '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
> >> +
> >> epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
> >> '// String whereClause = ("Part.PartNum MATCHES('" +
> >> epiUltraComboC2.Text &
> >> "*') OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*'))
> >> '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
> >> +
> >> epiUltraComboC2.Text & "*')" OR "Part.Description MATCHES('" +
> >> epiUltraComboC2.Text & "*')", "PartNum,Description,ClassID,UnitPrice")
> >>
> >>
> >> String WhereClause = "Part.PartNum MATCHES('" + epiUltraComboC2.Text &
> >> "*')"
> >> OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
> >> DataSet lst =
> >> read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")
> >>
> >>
> >> epiUltraComboC2.DataSource = lst
> >> epiUltraComboC2.ValueMember = "PartNum"
> >> epiUltraComboC2.DisplayMember = "PartNum"
> >> End Sub
> >> Private Sub epiUltraComboC2_KeyPress(ByVal sender As Object, ByVal args
> >> As
> >> System.Windows.Forms.KeyPressEventArgs)
> >> ' ** Place Event Handling Code Here **
> >> If EpiUltraComboC2.Text.Length > 2 Then PartSearch
> >> End Sub
> >>
> >> Private Sub epiUltraComboC2_KeyUp(ByVal sender As Object, ByVal args As
> >> System.Windows.Forms.KeyEventArgs)
> >> ' ** Place Event Handling Code Here **
> >> If EpiUltraComboC2.Text.Length > 2 Then PartSearch
> >> End Sub
> >>
> >> End Module
> >>
> >> And this is the compile errors I am getting ...
> >>
> >> Compiling Custom Code ...
> >>
> >> ----------errors------------
> >> Error: BC30109 - line 74 (415) - 'String' is a class type and cannot be
> >> used as
> >> an expression.
> >> Error: BC30287 - line 74 (415) - '.' expected.
> >> Error: BC30108 - line 75 (416) - 'DataSet' is a type and cannot be used
> >> as an
> >> expression.
> >> Error: BC30800 - line 75 (416) - Method arguments must be enclosed in
> >> parentheses.
> >> Error: BC30451 - line 75 (416) - Name 'lst' is not declared.
> >> Error: BC30451 - line 75 (416) - Name 'whereClause' is not declared.
> >> Error: BC30451 - line 77 (418) - Name 'lst' is not declared.
> >> ** Compile Failed. **
> >>
> >> ________________________________
> >> From: Jose Gomez <jose@... <jose%40josecgomez.com>>
> >> To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
> >>
> >> Sent: Mon, 27 September, 2010 16:54:55
> >> Subject: Re: [Vantage] Re: Auto Fill
> >>
> >> Just replace the where Clause with something like shown below. For Using
> >> Description
> >>
> >> String whereClause ="Part.PartNum MATCHES('"+epiUltraComboC1.Text+"*') OR
> >> Part.PartDescription MATCHES ('"+epiUltraComboC1.Text+"*')";
> >>
> >> DataSet lst = read.GetList("Part",whereClause
> >> ,"PartNum,PartDescription,ClassID,UnitPrice");
> >>
> >> To show only Manufactured parts just modify the query again to looking at
> >> whatever field that tells you its manufactured.. how do you know when a
> >> part
> >> is manufactured???
> >> If you tell me what you look at , I can give you the right query. However
> >> keep in mind that if the field is outside of th Part table then you are
> >> pretty much out of luck
> >>
> >> Sincerely
> >> Jose C Gomez
> >>
> >> http://www.josecgomez.com
> >>
> >> On Mon, Sep 27, 2010 at 11:37 AM, Jose Gomez <jose@...<jose%40josecgomez.com>>
> >> wrote:
> >>
> >> > If you look in the original thread? (Which BTW why did you all create
> >> > another one??) you shoulkd see the code for using Description, you can
> >> also
> >> > modify the query to include only manufactured parts the same way.
> >> > Sincerely
> >> > Jose C Gomez
> >> >
> >> > http://www.josecgomez.com
> >> >
> >> >
> >> >
> >> > On Mon, Sep 27, 2010 at 11:11 AM, Chris Thompson
> >> ><chriselectrix@... <chriselectrix%40ymail.com>>wrote:
> >> >
> >> >>
> >> >>
> >> >> Hi
> >> >>
> >> >> Ive finally got it working.
> >> >>
> >> >> Do you know if there is any way that it can be customised even further
> >> to
> >> >> only
> >> >> include 'manufactured' parts in the available parts that can be
> >> selected,
> >> >> rather
> >> >> than displaying all parts?
> >> >>
> >> >> Also what do I need to do to my code to allow it to search on
> >> Description
> >> >> as
> >> >> well as Part Number?
> >> >>
> >> >> I can see this code coming in useful all over!!
> >> >>
> >> >> Thanks,
> >> >>
> >> >> CHRIS
> >> >>
> >> >>
> >> >> ________________________________
> >> >> From: Dan Sirow <dansirow@... <dansirow%40iccparts.com><dansirow%
> >> 40iccparts.com>>
> >> >> To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> >> 40yahoogroups.com>
> >>
> >> >>
> >> >> Sent: Mon, 27 September, 2010 15:49:11
> >> >> Subject: [Vantage] Re: Auto Fill
> >> >>
> >> >>
> >> >>
> >> >> Use the wizards to create the event code.
> >> >>
> >> >> Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
> >> >> Custom
> >> >> Control is epiUltraCombo2(matching your code), Available Controls pick
> >> >> both Key
> >> >> Press and Key UP, then update all event code. In the event code that is
> >> >> created,
> >> >> enter code like:
> >> >> If EpiUltraComboC2.Text.Length > 3 Then PartSearch
> >> >>
> >> >> This was the 1st time I used the event wizard, really cool stuff!
> >> >>
> >> >> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> >> 40yahoogroups.com>, Chris
> >>
> >> >> Thompson <chriselectrix@> wrote:
> >> >> >
> >> >> > This is what I have so far - what else do I need to do to get it to
> >> >> work??
> >> >> >
> >> >> > '//**************************************************
> >> >> > '// Custom VB.NET code for SalesOrderForm
> >> >> > '// Created: 27/09/2010 13:15:44
> >> >> > '//**************************************************
> >> >> > Imports System
> >> >> > Imports System.Data
> >> >> > Imports System.Diagnostics
> >> >> > Imports System.Windows.Forms
> >> >> > Imports System.ComponentModel
> >> >> > Imports Microsoft.VisualBasic
> >> >> > Imports Epicor.Mfg.Lib
> >> >> > Imports Epicor.Mfg.UI
> >> >> > Imports Epicor.Mfg.UI.FrameWork
> >> >> > Imports Epicor.Mfg.UI.ExtendedProps
> >> >> > Imports Epicor.Mfg.UI.FormFunctions
> >> >> > Imports Epicor.Mfg.UI.Customization
> >> >> > Imports Epicor.Mfg.UI.Adapters
> >> >> > Imports Epicor.Mfg.UI.Searches
> >> >> > Imports Epicor.Mfg.BO
> >> >> >
> >> >> > Module Script
> >> >> >
> >> >> > Â '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard
> >> Added
> >> >> Module
> >> >>
> >> >> > Level Variables' Comments! **
> >> >> >
> >> >> > Â '// Begin Wizard Added Module Level Variables **
> >> >> > Â '// End Wizard Added Module Level Variables **
> >> >> >
> >> >> > Â '// Add Custom Module Level Variables Here **
> >> >> > Â Â Â Private read as BOReader = nothing
> >> >> > Â Â Â '//Private rdr As Epicor.Mfg.Lib.BOReader
> >> >> >
> >> >> > Â Sub InitializeCustomCode()
> >> >> > Â Â Â read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >> >> > Â Â '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> >> >> Added
> >> >> >Variable
> >> >> >
> >> >> > Initialization' lines **
> >> >> >
> >> >> > Â Â '// Begin Wizard Added Variable Initialization
> >> >> > Â Â '// End Wizard Added Variable Initialization
> >> >> > Â Â '// Begin Wizard Added Custom Method Calls
> >> >> > Â Â '// End Wizard Added Custom Method Calls
> >> >> > Â Â Â Â Â Â Â
> >> >> > Â End Sub
> >> >> > Â Â Â Â Â
> >> >> > Â Sub DestroyCustomCode()
> >> >> >
> >> >> > Â Â '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> >> >> Added
> >> >> >Object
> >> >> >
> >> >> > Disposal' lines **
> >> >> >
> >> >> > Â Â '// Begin Wizard Added Object Disposal
> >> >> > Â Â '// End Wizard Added Object Disposal
> >> >> > Â Â '// Begin Custom Code Disposal
> >> >> > Â Â '// End Custom Code Disposal
> >> >> > Â End Sub
> >> >> > Â Â Â Private Sub PartSearch()
> >> >> > Â Â Â Dim lst As DataSet = read.GetList("Part", "Part.PartNum
> >> >> MATCHES('" +
> >> >> > epiUltraComboC2.Text &
> >> >> "*')","PartNum,PartDescription,ClassID,UnitPrice")
> >> >> > Â Â Â epiUltraComboC2.DataSource = lst
> >> >> > Â Â Â epiUltraComboC2.ValueMember = "PartNum"
> >> >> > Â Â Â epiUltraComboC2.DisplayMember = "PartNum"
> >> >> > Â Â Â End Sub
> >> >> > End Module
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > ________________________________
> >> >> > From: gmack110256 <genemack@>
> >> >> > To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> >> 40yahoogroups.com>
> >>
> >> >> > Sent: Mon, 27 September, 2010 13:19:54
> >> >> > Subject: [Vantage] Auto Fill
> >> >> >
> >> >> > Â
> >> >> > I think I got the Imports Epicor Lib. set now.
> >> >> >
> >> >> > Below is the syntax I have in the Script Editor. Everything seems to
> >> >> work
> >> >> >except
> >> >> >
> >> >> > I get the following error.
> >> >> >
> >> >> > Error: BC30289 - line 39 (236) - Statement cannot appear within a
> >> method
> >> >> body.
> >> >>
> >> >> > End of method assumed.
> >> >> >
> >> >> > Can anyone tell me what I am Missing.
> >> >> >
> >> >> > Gene
> >> >> >
> >> >> > Sub InitializeCustomCode()
> >> >> >
> >> >> > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >> >> >
> >> >> >
> >> >> > Private Sub PartSearch()
> >> >> >
> >> >> > Dim whereClause As String
> >> >> >
> >> >> > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
> >> >> >
> >> >> > Dim lst as Dataset =
> >> >> >
> >> >>
> >> read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > [Non-text portions of this message have been removed]
> >> >> >
> >> >>
> >> >> [Non-text portions of this message have been removed]
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >> ------------------------------------
> >>
> >>
> >> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> >> have
> >> already linked your email address to a yahoo id to enable access. )
> >> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> >> Crystal Reports and other 'goodies', please goto:
> >> http://groups.yahoo.com/group/vantage/files/.
> >>
> >> (2) To search through old msg's goto:
> >> http://groups.yahoo.com/group/vantage/messages
> >> (3) To view links to Vendors that provide Vantage services goto:
> >> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
> >>
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >>
> >>
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
I have tried changing the + to & and also bw2868bond's suggestion of too many
double quotes and I am still getting the error when testing the SO Entery
"Unhandled exception has occurred ...

"Invalid query@ where Company = 'ELEC01' and (Part.PartNum MATCHES('tce*') OR
Part.Description MATCHES('tce*'))."

Does anyone know why?




________________________________
From: bw2868bond <bwalker@...>
To: vantage@yahoogroups.com
Sent: Tue, 28 September, 2010 14:04:53
Subject: [Vantage] Re: Auto Fill

Â
too many double quotes?

Dim WhereClause as String = "Part.PartNum MATCHES('" + epiUltraComboC2.Text &
"*') OR Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"

--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> Replace + signs with & for VB
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
>
> On Tue, Sep 28, 2010 at 8:06 AM, Jose Gomez <jose@...> wrote:
>
> > Its because you are using VB and I gave you code in C#, it needs to be
> > translated to VB
> >
> > Dim WhereClause as String = "Part.PartNum MATCHES('" + epiUltraComboC2.Text
> > & "*')"
> >
> > OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
> > Dim lst as DataSet
> > = read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")
> >
> >
> >
> >
> >
> > Sincerely
> > Jose C Gomez
> >
> > http://www.josecgomez.com
> >
> >
> > On Tue, Sep 28, 2010 at 7:52 AM, Chris Thompson <chriselectrix@...>wrote:
> >
> >>
> >>
> >> Hi Jose
> >>
> >> This is what I have ...
> >>
> >>
> >> '//**************************************************
> >> '// Custom VB.NET code for SalesOrderForm
> >> '// Created: 27/09/2010 13:15:44
> >> '//**************************************************
> >> Imports System
> >> Imports System.Data
> >> Imports System.Diagnostics
> >> Imports System.Windows.Forms
> >> Imports System.ComponentModel
> >> Imports Microsoft.VisualBasic
> >> Imports Epicor.Mfg.Lib
> >> Imports Epicor.Mfg.UI
> >> Imports Epicor.Mfg.UI.FrameWork
> >> Imports Epicor.Mfg.UI.ExtendedProps
> >> Imports Epicor.Mfg.UI.FormFunctions
> >> Imports Epicor.Mfg.UI.Customization
> >> Imports Epicor.Mfg.UI.Adapters
> >> Imports Epicor.Mfg.UI.Searches
> >> Imports Epicor.Mfg.BO
> >>
> >> Module Script
> >>
> >> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added
> >> Module
> >> Level Variables' Comments! **
> >>
> >> '// Begin Wizard Added Module Level Variables **
> >> '// End Wizard Added Module Level Variables **
> >>
> >> '// Add Custom Module Level Variables Here **
> >> Private read as BOReader = nothing
> >> '//Private rdr As Epicor.Mfg.Lib.BOReader
> >>
> >> Sub InitializeCustomCode()
> >> read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
> >> Variable
> >> Initialization' lines **
> >>
> >> '// Begin Wizard Added Variable Initialization
> >> '// End Wizard Added Variable Initialization
> >> '// Begin Wizard Added Custom Method Calls
> >> AddHandler epiUltraComboC2.KeyPress, AddressOf
> >> Script.epiUltraComboC2_KeyPress
> >> AddHandler epiUltraComboC2.KeyUp, AddressOf Script.epiUltraComboC2_KeyUp
> >> '// End Wizard Added Custom Method Calls
> >>
> >> End Sub
> >>
> >> Sub DestroyCustomCode()
> >>
> >> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
> >> Object
> >> Disposal' lines **
> >>
> >> '// Begin Wizard Added Object Disposal
> >> RemoveHandler epiUltraComboC2.KeyPress, AddressOf
> >> Script.epiUltraComboC2_KeyPress
> >> RemoveHandler epiUltraComboC2.KeyUp, AddressOf
> >> Script.epiUltraComboC2_KeyUp
> >> '// End Wizard Added Object Disposal
> >> '// Begin Custom Code Disposal
> >> '// End Custom Code Disposal
> >> End Sub
> >> Private Sub PartSearch()
> >> '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
> >> +
> >> epiUltraComboC2.Text & "*')","PartNum,PartDescription,ClassID,UnitPrice")
> >> '// String whereClause = ("Part.PartNum MATCHES('" +
> >> epiUltraComboC2.Text &
> >> "*') OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*'))
> >> '// Dim lst As DataSet = read.GetList("Part", "Part.PartNum MATCHES('"
> >> +
> >> epiUltraComboC2.Text & "*')" OR "Part.Description MATCHES('" +
> >> epiUltraComboC2.Text & "*')", "PartNum,Description,ClassID,UnitPrice")
> >>
> >>
> >> String WhereClause = "Part.PartNum MATCHES('" + epiUltraComboC2.Text &
> >> "*')"
> >> OR "Part.Description MATCHES('" + epiUltraComboC2.Text & "*')"
> >> DataSet lst =
> >> read.GetList("Part",whereClause,"PartNum,Description,ClassID,UnitPrice")
> >>
> >>
> >> epiUltraComboC2.DataSource = lst
> >> epiUltraComboC2.ValueMember = "PartNum"
> >> epiUltraComboC2.DisplayMember = "PartNum"
> >> End Sub
> >> Private Sub epiUltraComboC2_KeyPress(ByVal sender As Object, ByVal args
> >> As
> >> System.Windows.Forms.KeyPressEventArgs)
> >> ' ** Place Event Handling Code Here **
> >> If EpiUltraComboC2.Text.Length > 2 Then PartSearch
> >> End Sub
> >>
> >> Private Sub epiUltraComboC2_KeyUp(ByVal sender As Object, ByVal args As
> >> System.Windows.Forms.KeyEventArgs)
> >> ' ** Place Event Handling Code Here **
> >> If EpiUltraComboC2.Text.Length > 2 Then PartSearch
> >> End Sub
> >>
> >> End Module
> >>
> >> And this is the compile errors I am getting ...
> >>
> >> Compiling Custom Code ...
> >>
> >> ----------errors------------
> >> Error: BC30109 - line 74 (415) - 'String' is a class type and cannot be
> >> used as
> >> an expression.
> >> Error: BC30287 - line 74 (415) - '.' expected.
> >> Error: BC30108 - line 75 (416) - 'DataSet' is a type and cannot be used
> >> as an
> >> expression.
> >> Error: BC30800 - line 75 (416) - Method arguments must be enclosed in
> >> parentheses.
> >> Error: BC30451 - line 75 (416) - Name 'lst' is not declared.
> >> Error: BC30451 - line 75 (416) - Name 'whereClause' is not declared.
> >> Error: BC30451 - line 77 (418) - Name 'lst' is not declared.
> >> ** Compile Failed. **
> >>
> >> ________________________________
> >> From: Jose Gomez <jose@... <jose%40josecgomez.com>>
> >> To: vantage@yahoogroups.com <vantage%40yahoogroups.com>
> >>
> >> Sent: Mon, 27 September, 2010 16:54:55
> >> Subject: Re: [Vantage] Re: Auto Fill
> >>
> >> Just replace the where Clause with something like shown below. For Using
> >> Description
> >>
> >> String whereClause ="Part.PartNum MATCHES('"+epiUltraComboC1.Text+"*') OR
> >> Part.PartDescription MATCHES ('"+epiUltraComboC1.Text+"*')";
> >>
> >> DataSet lst = read.GetList("Part",whereClause
> >> ,"PartNum,PartDescription,ClassID,UnitPrice");
> >>
> >> To show only Manufactured parts just modify the query again to looking at
> >> whatever field that tells you its manufactured.. how do you know when a
> >> part
> >> is manufactured???
> >> If you tell me what you look at , I can give you the right query. However
> >> keep in mind that if the field is outside of th Part table then you are
> >> pretty much out of luck
> >>
> >> Sincerely
> >> Jose C Gomez
> >>
> >> http://www.josecgomez.com
> >>
> >> On Mon, Sep 27, 2010 at 11:37 AM, Jose Gomez
><jose@...<jose%40josecgomez.com>>
> >> wrote:
> >>
> >> > If you look in the original thread? (Which BTW why did you all create
> >> > another one??) you shoulkd see the code for using Description, you can
> >> also
> >> > modify the query to include only manufactured parts the same way.
> >> > Sincerely
> >> > Jose C Gomez
> >> >
> >> > http://www.josecgomez.com
> >> >
> >> >
> >> >
> >> > On Mon, Sep 27, 2010 at 11:11 AM, Chris Thompson
> >> ><chriselectrix@... <chriselectrix%40ymail.com>>wrote:
> >> >
> >> >>
> >> >>
> >> >> Hi
> >> >>
> >> >> Ive finally got it working.
> >> >>
> >> >> Do you know if there is any way that it can be customised even further
> >> to
> >> >> only
> >> >> include 'manufactured' parts in the available parts that can be
> >> selected,
> >> >> rather
> >> >> than displaying all parts?
> >> >>
> >> >> Also what do I need to do to my code to allow it to search on
> >> Description
> >> >> as
> >> >> well as Part Number?
> >> >>
> >> >> I can see this code coming in useful all over!!
> >> >>
> >> >> Thanks,
> >> >>
> >> >> CHRIS
> >> >>
> >> >>
> >> >> ________________________________
> >> >> From: Dan Sirow <dansirow@... <dansirow%40iccparts.com><dansirow%
> >> 40iccparts.com>>
> >> >> To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> >> 40yahoogroups.com>
> >>
> >> >>
> >> >> Sent: Mon, 27 September, 2010 15:49:11
> >> >> Subject: [Vantage] Re: Auto Fill
> >> >>
> >> >>
> >> >>
> >> >> Use the wizards to create the event code.
> >> >>
> >> >> Wizards tab, then Event Wizard, Control Type Filter is EpiUltraCombo,
> >> >> Custom
> >> >> Control is epiUltraCombo2(matching your code), Available Controls pick
> >> >> both Key
> >> >> Press and Key UP, then update all event code. In the event code that is
> >> >> created,
> >> >> enter code like:
> >> >> If EpiUltraComboC2.Text.Length > 3 Then PartSearch
> >> >>
> >> >> This was the 1st time I used the event wizard, really cool stuff!
> >> >>
> >> >> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> >> 40yahoogroups.com>, Chris
> >>
> >> >> Thompson <chriselectrix@> wrote:
> >> >> >
> >> >> > This is what I have so far - what else do I need to do to get it to
> >> >> work??
> >> >> >
> >> >> > '//**************************************************
> >> >> > '// Custom VB.NET code for SalesOrderForm
> >> >> > '// Created: 27/09/2010 13:15:44
> >> >> > '//**************************************************
> >> >> > Imports System
> >> >> > Imports System.Data
> >> >> > Imports System.Diagnostics
> >> >> > Imports System.Windows.Forms
> >> >> > Imports System.ComponentModel
> >> >> > Imports Microsoft.VisualBasic
> >> >> > Imports Epicor.Mfg.Lib
> >> >> > Imports Epicor.Mfg.UI
> >> >> > Imports Epicor.Mfg.UI.FrameWork
> >> >> > Imports Epicor.Mfg.UI.ExtendedProps
> >> >> > Imports Epicor.Mfg.UI.FormFunctions
> >> >> > Imports Epicor.Mfg.UI.Customization
> >> >> > Imports Epicor.Mfg.UI.Adapters
> >> >> > Imports Epicor.Mfg.UI.Searches
> >> >> > Imports Epicor.Mfg.BO
> >> >> >
> >> >> > Module Script
> >> >> >
> >> >> > Â '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard
> >> Added
> >> >> Module
> >> >>
> >> >> > Level Variables' Comments! **
> >> >> >
> >> >> > Â '// Begin Wizard Added Module Level Variables **
> >> >> > Â '// End Wizard Added Module Level Variables **
> >> >> >
> >> >> > Â '// Add Custom Module Level Variables Here **
> >> >> > Â Â Â Private read as BOReader = nothing
> >> >> > Â Â Â '//Private rdr As Epicor.Mfg.Lib.BOReader
> >> >> >
> >> >> > Â Sub InitializeCustomCode()
> >> >> > Â Â Â read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >> >> > Â Â '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> >> >> Added
> >> >> >Variable
> >> >> >
> >> >> > Initialization' lines **
> >> >> >
> >> >> > Â Â '// Begin Wizard Added Variable Initialization
> >> >> > Â Â '// End Wizard Added Variable Initialization
> >> >> > Â Â '// Begin Wizard Added Custom Method Calls
> >> >> > Â Â '// End Wizard Added Custom Method Calls
> >> >> > Â Â Â Â Â Â Â
> >> >> > Â End Sub
> >> >> > Â Â Â Â Â
> >> >> > Â Sub DestroyCustomCode()
> >> >> >
> >> >> > Â Â '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> >> >> Added
> >> >> >Object
> >> >> >
> >> >> > Disposal' lines **
> >> >> >
> >> >> > Â Â '// Begin Wizard Added Object Disposal
> >> >> > Â Â '// End Wizard Added Object Disposal
> >> >> > Â Â '// Begin Custom Code Disposal
> >> >> > Â Â '// End Custom Code Disposal
> >> >> > Â End Sub
> >> >> > Â Â Â Private Sub PartSearch()
> >> >> > Â Â Â Dim lst As DataSet = read.GetList("Part", "Part.PartNum
> >> >> MATCHES('" +
> >> >> > epiUltraComboC2.Text &
> >> >> "*')","PartNum,PartDescription,ClassID,UnitPrice")
> >> >> > Â Â Â epiUltraComboC2.DataSource = lst
> >> >> > Â Â Â epiUltraComboC2.ValueMember = "PartNum"
> >> >> > Â Â Â epiUltraComboC2.DisplayMember = "PartNum"
> >> >> > Â Â Â End Sub
> >> >> > End Module
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > ________________________________
> >> >> > From: gmack110256 <genemack@>
> >> >> > To: vantage@yahoogroups.com <vantage%40yahoogroups.com> <vantage%
> >> 40yahoogroups.com>
> >>
> >> >> > Sent: Mon, 27 September, 2010 13:19:54
> >> >> > Subject: [Vantage] Auto Fill
> >> >> >
> >> >> > Â
> >> >> > I think I got the Imports Epicor Lib. set now.
> >> >> >
> >> >> > Below is the syntax I have in the Script Editor. Everything seems to
> >> >> work
> >> >> >except
> >> >> >
> >> >> > I get the following error.
> >> >> >
> >> >> > Error: BC30289 - line 39 (236) - Statement cannot appear within a
> >> method
> >> >> body.
> >> >>
> >> >> > End of method assumed.
> >> >> >
> >> >> > Can anyone tell me what I am Missing.
> >> >> >
> >> >> > Gene
> >> >> >
> >> >> > Sub InitializeCustomCode()
> >> >> >
> >> >> > read = New BOReader(SalesOrderForm.Session.ConnectionPool)
> >> >> >
> >> >> >
> >> >> > Private Sub PartSearch()
> >> >> >
> >> >> > Dim whereClause As String
> >> >> >
> >> >> > whereClause ="Part.PartNum MATCHES('"+ucbepiCustom1.Text+"*')"
> >> >> >
> >> >> > Dim lst as Dataset =
> >> >> >
> >> >>
> >>
read.GetList("Part",whereClause,"PartNum,PartDescription,ClassID,UnitPrice")
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > [Non-text portions of this message have been removed]
> >> >> >
> >> >>
> >> >> [Non-text portions of this message have been removed]
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >> ------------------------------------
> >>
> >>
> >> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> >> have
> >> already linked your email address to a yahoo id to enable access. )
> >> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> >> Crystal Reports and other 'goodies', please goto:
> >> http://groups.yahoo.com/group/vantage/files/.
> >>
> >> (2) To search through old msg's goto:
> >> http://groups.yahoo.com/group/vantage/messages
> >> (3) To view links to Vendors that provide Vantage services goto:
> >> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
> >>
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >>
> >>
> >
> >
>
>
> [Non-text portions of this message have been removed]
>







[Non-text portions of this message have been removed]