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 ?
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]