From: Eamonn on
Hey I have a combo box programmed to return the numeric value selected in an
another combo box. However when I click on a value that presents itself in my
pull down menu in the combo box the form crashes and presents me with the
error " Run time error 2001 You cancelled the previous operation". I am then
presented with Me.RecordSource = QuerySTR as the error. I dont understand why
this the case??

Any thoughts Ladies and Gentleman,

-Eamonn
From: Douglas J Steele on
Are you sure that QuerySTR is valid at that point? The error message you're
showing is sometimes used incorrectly when there's a reference in a query or
domain aggregate function (DLookup, DSum, etc) with an incorrect name in it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Eamonn" <Eamonn(a)discussions.microsoft.com> wrote in message
news:F5BE9FD2-CF25-404C-A037-CF68D350DAD3(a)microsoft.com...
> Hey I have a combo box programmed to return the numeric value selected in
an
> another combo box. However when I click on a value that presents itself in
my
> pull down menu in the combo box the form crashes and presents me with the
> error " Run time error 2001 You cancelled the previous operation". I am
then
> presented with Me.RecordSource = QuerySTR as the error. I dont understand
why
> this the case??
>
> Any thoughts Ladies and Gentleman,
>
> -Eamonn


From: Eamonn on
solved it myself -jus had an extra quote in my coding from that was not needed

If (Me.Combo56.Value = 0) Then 'AMT CCY
QuerySTR = QuerySTR
Else
QuerySTR = QuerySTR + " and [sheet1].[LCL CCY ORDERED] = '" &
Val(Trim(Me.Combo56.Value)) & "'"
End If

Shoulda been

If (Me.Combo56.Value = 0) Then 'AMT CCY
QuerySTR = QuerySTR
Else
QuerySTR = QuerySTR + " and [sheet1].[LCL CCY ORDERED] = " &
Val(Trim(Me.Combo56.Value)) & ""
End If




"Eamonn" wrote:

> Hey I have a combo box programmed to return the numeric value selected in an
> another combo box. However when I click on a value that presents itself in my
> pull down menu in the combo box the form crashes and presents me with the
> error " Run time error 2001 You cancelled the previous operation". I am then
> presented with Me.RecordSource = QuerySTR as the error. I dont understand why
> this the case??
>
> Any thoughts Ladies and Gentleman,
>
> -Eamonn
From: Eamonn on
Ye seems cool no problems with testing,


Regards,
Eamonn

"Douglas J Steele" wrote:

> Are you sure that QuerySTR is valid at that point? The error message you're
> showing is sometimes used incorrectly when there's a reference in a query or
> domain aggregate function (DLookup, DSum, etc) with an incorrect name in it.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "Eamonn" <Eamonn(a)discussions.microsoft.com> wrote in message
> news:F5BE9FD2-CF25-404C-A037-CF68D350DAD3(a)microsoft.com...
> > Hey I have a combo box programmed to return the numeric value selected in
> an
> > another combo box. However when I click on a value that presents itself in
> my
> > pull down menu in the combo box the form crashes and presents me with the
> > error " Run time error 2001 You cancelled the previous operation". I am
> then
> > presented with Me.RecordSource = QuerySTR as the error. I dont understand
> why
> > this the case??
> >
> > Any thoughts Ladies and Gentleman,
> >
> > -Eamonn
>
>
>