Invalid procedure call?

Hello All

This is a re-post of a problem I posted a while ago, but to which I got no
suggestions: hopefully I'll be more lucky this time!?

I have the following code in a Private Sub:

If InStr([ResponseXML], "element") > 0 Then
errorfield = "Invalid " & Mid([ResponseXML], InStr([ResponseXML],
"element"), InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], "'")
+ 1, [ResponseXML], "'") - InStr([ResponseXML], "element") + 1)
Else
....

Most of the time this works fine, but for some datastring values of
[ResponseXML] I get
Invalid procedure call or argument
and the code stops on the 'errorfield = ...' expression. This has occurred
where [ResponseXML] does contain the string "element" (obviously - otherwise
the code wouldn't get past the condition into the expression!). The curious
thing is that if I use the exact same errorfield expression in a query, on
the same value of [ResponseXML], it returns the expected result (which is
<Invalid Element 'TaxCodeAtLeaving'> - without the <>s). I could understand
it if I'd just got duff syntax, but the fact that the query works ...?

In case it helps, one value of [ResponseXML] where this problem occurs is
below.

Hope someone can help
Many thanks
Leslie Isaacs


Problem value of [ResponseXML] follows:

....................HTTP Text: 200 OK
Request: submit_poll
Response: submit_error
CorrelationID: C3CFE512E3EB40D0B93A3A43A01348B1
Info: : The submission of this document has failed due to departmental
specific business logic in the Body tag.
The submission of this document has failed due to departmental specific
business logic in the Body tag.
<?xml version="1.0"?><GovTalkMessage
xmlns="http://www.govtalk.gov.uk/CM/envelope"><EnvelopeVersion>1.0</EnvelopeVersion><Header><MessageDetails><Class>IR-PAYE-MOV</Class><Qualifier>error</Qualifier><Function>submit</Function><TransactionID></TransactionID><CorrelationID>C3CFE512E3EB40D0B93A3A43A01348B1</CorrelationID><ResponseEndPoint
PollInterval="10">https://secure.gateway.gov.uk/poll</ResponseEndPoint><GatewayTimestamp>2009-11-12T15:55:39.662</GatewayTimestamp></MessageDetails><SenderDetails
/></Header><GovTalkDetails><Keys
/><GovTalkErrors><Error><RaisedBy>Department</RaisedBy><Number>3001</Number><Type>business</Type><Text>The
submission of this document has failed due to departmental specific business
logic in the Body tag.</Text></Error></GovTalkErrors></GovTalkDetails><Body>
<ErrorResponse xmlns="http://www.govtalk.gov.uk/CM/errorresponse"
SchemaVersion="2.0">
<Application>
<MessageCount>2</MessageCount>
</Application>
<Error>
<RaisedBy>ChRIS</RaisedBy>
<Number>4085</Number>
<Type>schema</Type>
<Text>Value '0NT' doesn't have the correct format</Text>
<Location>/hd:GovTalkMessage[1]/hd:Body[1]/mov:IRenvelope[1]/mov:InYearMovements[1]/mov:P45Part1[1]/mov:TaxCodeAtLeaving[1]</Location>
<Application>
<Messages xmlns="http://www.govtalk.gov.uk/validation/messages/1">
<ServiceMessage>
<UserText number="7674">Tax code entered is not a valid code.</UserText>
</ServiceMessage>
<DeveloperMessage>cvc-pattern-valid: Value '0NT' is not facet-valid with
respect to pattern
'([1-9][0-9]{0,5}[LPTVY])|(BR)|(0T)|(NT)|(FT)|(D0)|([K][1-9][0-9]{0,5})' for
type '_intermediate_TaxCodeStructure'.</DeveloperMessage>
</Messages>
</Application>
</Error>
<Error>
<RaisedBy>ChRIS</RaisedBy>
<Number>4052</Number>
<Type>schema</Type>
<Text>Element 'TaxCodeAtLeaving' must only have valid text as its
content</Text>
<Location>/hd:GovTalkMessage[1]/hd:Body[1]/mov:IRenvelope[1]/mov:InYearMovements[1]/mov:P45Part1[1]/mov:TaxCodeAtLeaving[1]</Location>
<Application>
<Messages xmlns="http://www.govtalk.gov.uk/validation/messages/1">
<ServiceMessage>
<UserText number="7674">Tax code entered is not a valid code.</UserText>
</ServiceMessage>
<DeveloperMessage>cvc-complex-type.2.2: Element 'TaxCodeAtLeaving' must have
no element [children], and the value must be valid.</DeveloperMessage>
</Messages>
</Application>
</Error>
</ErrorResponse>
</Body>
</GovTalkMessage>



0
Leslie
11/26/2009 1:01:41 PM
access.modulesdaovba 1670 articles. 0 followers. Follow

5 Replies
1160 Views

Similar Articles

[PageSpeed] 46

To debug your problem, add MsgBox steps into the code to show you the values 
being calculated for all your InStr and Mid arguments. That should show you 
where the code is "going wrong".

If InStr([ResponseXML], "element") > 0 Then

MsgBox InStr([ResponseXML],"element")
MsgBox InStr([ResponseXML], "element"), [ResponseXML], "'") + 1
MsgBox InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], "'") + 1, 
[ResponseXML], "'")
MsgBox InStr([ResponseXML], "element") + 1
MsgBox InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], "'") + 1, 
[ResponseXML], "'") - InStr([ResponseXML], "element") + 1

errorfield = "Invalid " & Mid([ResponseXML], InStr([ResponseXML],
"element"), InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], "'")
+ 1, [ResponseXML], "'") - InStr([ResponseXML], "element") + 1)
Else
....

-- 

        Ken Snell
http://www.accessmvp.com/KDSnell/



"Leslie Isaacs" <leslie@gppayroll.org.uk> wrote in message 
news:OWCebipbKHA.5976@TK2MSFTNGP05.phx.gbl...
> Hello All
>
> This is a re-post of a problem I posted a while ago, but to which I got no
> suggestions: hopefully I'll be more lucky this time!?
>
> I have the following code in a Private Sub:
>
> If InStr([ResponseXML], "element") > 0 Then
> errorfield = "Invalid " & Mid([ResponseXML], InStr([ResponseXML],
> "element"), InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], 
> "'")
> + 1, [ResponseXML], "'") - InStr([ResponseXML], "element") + 1)
> Else
> ...
>
> Most of the time this works fine, but for some datastring values of
> [ResponseXML] I get
> Invalid procedure call or argument
> and the code stops on the 'errorfield = ...' expression. This has occurred
> where [ResponseXML] does contain the string "element" (obviously - 
> otherwise
> the code wouldn't get past the condition into the expression!). The 
> curious
> thing is that if I use the exact same errorfield expression in a query, on
> the same value of [ResponseXML], it returns the expected result (which is
> <Invalid Element 'TaxCodeAtLeaving'> - without the <>s). I could 
> understand
> it if I'd just got duff syntax, but the fact that the query works ...?
>
> In case it helps, one value of [ResponseXML] where this problem occurs is
> below.
>
> Hope someone can help
> Many thanks
> Leslie Isaacs
>
>
> Problem value of [ResponseXML] follows:
>
> ...................HTTP Text: 200 OK
> Request: submit_poll
> Response: submit_error
> CorrelationID: C3CFE512E3EB40D0B93A3A43A01348B1
> Info: : The submission of this document has failed due to departmental
> specific business logic in the Body tag.
> The submission of this document has failed due to departmental specific
> business logic in the Body tag.
> <?xml version="1.0"?><GovTalkMessage
> xmlns="http://www.govtalk.gov.uk/CM/envelope"><EnvelopeVersion>1.0</EnvelopeVersion><Header><MessageDetails><Class>IR-PAYE-MOV</Class><Qualifier>error</Qualifier><Function>submit</Function><TransactionID></TransactionID><CorrelationID>C3CFE512E3EB40D0B93A3A43A01348B1</CorrelationID><ResponseEndPoint
> PollInterval="10">https://secure.gateway.gov.uk/poll</ResponseEndPoint><GatewayTimestamp>2009-11-12T15:55:39.662</GatewayTimestamp></MessageDetails><SenderDetails
> /></Header><GovTalkDetails><Keys
> /><GovTalkErrors><Error><RaisedBy>Department</RaisedBy><Number>3001</Number><Type>business</Type><Text>The
> submission of this document has failed due to departmental specific 
> business
> logic in the Body 
> tag.</Text></Error></GovTalkErrors></GovTalkDetails><Body>
> <ErrorResponse xmlns="http://www.govtalk.gov.uk/CM/errorresponse"
> SchemaVersion="2.0">
> <Application>
> <MessageCount>2</MessageCount>
> </Application>
> <Error>
> <RaisedBy>ChRIS</RaisedBy>
> <Number>4085</Number>
> <Type>schema</Type>
> <Text>Value '0NT' doesn't have the correct format</Text>
> <Location>/hd:GovTalkMessage[1]/hd:Body[1]/mov:IRenvelope[1]/mov:InYearMovements[1]/mov:P45Part1[1]/mov:TaxCodeAtLeaving[1]</Location>
> <Application>
> <Messages xmlns="http://www.govtalk.gov.uk/validation/messages/1">
> <ServiceMessage>
> <UserText number="7674">Tax code entered is not a valid code.</UserText>
> </ServiceMessage>
> <DeveloperMessage>cvc-pattern-valid: Value '0NT' is not facet-valid with
> respect to pattern
> '([1-9][0-9]{0,5}[LPTVY])|(BR)|(0T)|(NT)|(FT)|(D0)|([K][1-9][0-9]{0,5})' 
> for
> type '_intermediate_TaxCodeStructure'.</DeveloperMessage>
> </Messages>
> </Application>
> </Error>
> <Error>
> <RaisedBy>ChRIS</RaisedBy>
> <Number>4052</Number>
> <Type>schema</Type>
> <Text>Element 'TaxCodeAtLeaving' must only have valid text as its
> content</Text>
> <Location>/hd:GovTalkMessage[1]/hd:Body[1]/mov:IRenvelope[1]/mov:InYearMovements[1]/mov:P45Part1[1]/mov:TaxCodeAtLeaving[1]</Location>
> <Application>
> <Messages xmlns="http://www.govtalk.gov.uk/validation/messages/1">
> <ServiceMessage>
> <UserText number="7674">Tax code entered is not a valid code.</UserText>
> </ServiceMessage>
> <DeveloperMessage>cvc-complex-type.2.2: Element 'TaxCodeAtLeaving' must 
> have
> no element [children], and the value must be valid.</DeveloperMessage>
> </Messages>
> </Application>
> </Error>
> </ErrorResponse>
> </Body>
> </GovTalkMessage>
>
>
> 


0
Ken
11/26/2009 2:35:51 PM
"Leslie Isaacs" <leslie@gppayroll.org.uk> wrote:

>This is a re-post of a problem I posted a while ago, but to which I got no
>suggestions: hopefully I'll be more lucky this time!?
>
>I have the following code in a Private Sub:
>
>If InStr([ResponseXML], "element") > 0 Then
>errorfield = "Invalid " & Mid([ResponseXML], InStr([ResponseXML],
>"element"), InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], "'")
>+ 1, [ResponseXML], "'") - InStr([ResponseXML], "element") + 1)
>Else

One thing I'd do is simplify the code a bit.

Dim ElementPosn as long
ElementPosn = InStr([ResponseXML], "element") 

then change the above code to use ElementPosn 

errorfield = "Invalid " & Mid([ResponseXML], ElementPosn ,
InStr(InStr(ElementPosn, [ResponseXML], "'")
+ 1, [ResponseXML], "'") - ElementPosn  + 1)

Of course I don't have various brackets and such matched up but I
suspect this might make it easier to figure out logic problems.

Tony
-- 
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a free, convenient utility to keep your users FEs and other files 
  updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
0
Tony
11/27/2009 5:05:25 AM
Hello Ken

Many thanks for your reply. I will try the msgboxes as you suggested - great 
idea!

I'll come back with any problems.
Thanks again
Les


"Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
news:OSaACXqbKHA.2084@TK2MSFTNGP02.phx.gbl...
> To debug your problem, add MsgBox steps into the code to show you the 
> values being calculated for all your InStr and Mid arguments. That should 
> show you where the code is "going wrong".
>
> If InStr([ResponseXML], "element") > 0 Then
>
> MsgBox InStr([ResponseXML],"element")
> MsgBox InStr([ResponseXML], "element"), [ResponseXML], "'") + 1
> MsgBox InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], "'") + 
> 1, [ResponseXML], "'")
> MsgBox InStr([ResponseXML], "element") + 1
> MsgBox InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], "'") + 
> 1, [ResponseXML], "'") - InStr([ResponseXML], "element") + 1
>
> errorfield = "Invalid " & Mid([ResponseXML], InStr([ResponseXML],
> "element"), InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], 
> "'")
> + 1, [ResponseXML], "'") - InStr([ResponseXML], "element") + 1)
> Else
> ...
>
> -- 
>
>        Ken Snell
> http://www.accessmvp.com/KDSnell/
>
>
>
> "Leslie Isaacs" <leslie@gppayroll.org.uk> wrote in message 
> news:OWCebipbKHA.5976@TK2MSFTNGP05.phx.gbl...
>> Hello All
>>
>> This is a re-post of a problem I posted a while ago, but to which I got 
>> no
>> suggestions: hopefully I'll be more lucky this time!?
>>
>> I have the following code in a Private Sub:
>>
>> If InStr([ResponseXML], "element") > 0 Then
>> errorfield = "Invalid " & Mid([ResponseXML], InStr([ResponseXML],
>> "element"), InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], 
>> "'")
>> + 1, [ResponseXML], "'") - InStr([ResponseXML], "element") + 1)
>> Else
>> ...
>>
>> Most of the time this works fine, but for some datastring values of
>> [ResponseXML] I get
>> Invalid procedure call or argument
>> and the code stops on the 'errorfield = ...' expression. This has 
>> occurred
>> where [ResponseXML] does contain the string "element" (obviously - 
>> otherwise
>> the code wouldn't get past the condition into the expression!). The 
>> curious
>> thing is that if I use the exact same errorfield expression in a query, 
>> on
>> the same value of [ResponseXML], it returns the expected result (which is
>> <Invalid Element 'TaxCodeAtLeaving'> - without the <>s). I could 
>> understand
>> it if I'd just got duff syntax, but the fact that the query works ...?
>>
>> In case it helps, one value of [ResponseXML] where this problem occurs is
>> below.
>>
>> Hope someone can help
>> Many thanks
>> Leslie Isaacs
>>
>>
>> Problem value of [ResponseXML] follows:
>>
>> ...................HTTP Text: 200 OK
>> Request: submit_poll
>> Response: submit_error
>> CorrelationID: C3CFE512E3EB40D0B93A3A43A01348B1
>> Info: : The submission of this document has failed due to departmental
>> specific business logic in the Body tag.
>> The submission of this document has failed due to departmental specific
>> business logic in the Body tag.
>> <?xml version="1.0"?><GovTalkMessage
>> xmlns="http://www.govtalk.gov.uk/CM/envelope"><EnvelopeVersion>1.0</EnvelopeVersion><Header><MessageDetails><Class>IR-PAYE-MOV</Class><Qualifier>error</Qualifier><Function>submit</Function><TransactionID></TransactionID><CorrelationID>C3CFE512E3EB40D0B93A3A43A01348B1</CorrelationID><ResponseEndPoint
>> PollInterval="10">https://secure.gateway.gov.uk/poll</ResponseEndPoint><GatewayTimestamp>2009-11-12T15:55:39.662</GatewayTimestamp></MessageDetails><SenderDetails
>> /></Header><GovTalkDetails><Keys
>> /><GovTalkErrors><Error><RaisedBy>Department</RaisedBy><Number>3001</Number><Type>business</Type><Text>The
>> submission of this document has failed due to departmental specific 
>> business
>> logic in the Body 
>> tag.</Text></Error></GovTalkErrors></GovTalkDetails><Body>
>> <ErrorResponse xmlns="http://www.govtalk.gov.uk/CM/errorresponse"
>> SchemaVersion="2.0">
>> <Application>
>> <MessageCount>2</MessageCount>
>> </Application>
>> <Error>
>> <RaisedBy>ChRIS</RaisedBy>
>> <Number>4085</Number>
>> <Type>schema</Type>
>> <Text>Value '0NT' doesn't have the correct format</Text>
>> <Location>/hd:GovTalkMessage[1]/hd:Body[1]/mov:IRenvelope[1]/mov:InYearMovements[1]/mov:P45Part1[1]/mov:TaxCodeAtLeaving[1]</Location>
>> <Application>
>> <Messages xmlns="http://www.govtalk.gov.uk/validation/messages/1">
>> <ServiceMessage>
>> <UserText number="7674">Tax code entered is not a valid code.</UserText>
>> </ServiceMessage>
>> <DeveloperMessage>cvc-pattern-valid: Value '0NT' is not facet-valid with
>> respect to pattern
>> '([1-9][0-9]{0,5}[LPTVY])|(BR)|(0T)|(NT)|(FT)|(D0)|([K][1-9][0-9]{0,5})' 
>> for
>> type '_intermediate_TaxCodeStructure'.</DeveloperMessage>
>> </Messages>
>> </Application>
>> </Error>
>> <Error>
>> <RaisedBy>ChRIS</RaisedBy>
>> <Number>4052</Number>
>> <Type>schema</Type>
>> <Text>Element 'TaxCodeAtLeaving' must only have valid text as its
>> content</Text>
>> <Location>/hd:GovTalkMessage[1]/hd:Body[1]/mov:IRenvelope[1]/mov:InYearMovements[1]/mov:P45Part1[1]/mov:TaxCodeAtLeaving[1]</Location>
>> <Application>
>> <Messages xmlns="http://www.govtalk.gov.uk/validation/messages/1">
>> <ServiceMessage>
>> <UserText number="7674">Tax code entered is not a valid code.</UserText>
>> </ServiceMessage>
>> <DeveloperMessage>cvc-complex-type.2.2: Element 'TaxCodeAtLeaving' must 
>> have
>> no element [children], and the value must be valid.</DeveloperMessage>
>> </Messages>
>> </Application>
>> </Error>
>> </ErrorResponse>
>> </Body>
>> </GovTalkMessage>
>>
>>
>>
>
> 


0
Leslie
11/27/2009 10:14:37 AM
Hello Tony

Good idea!

I could obviously use the same technique to improve the readability of the 
other arguments, and also using Ken's suggestion of the msgboxes I should be 
able to figure it out (but will come back here if I can't!).

Many thanks for your help
Les


"Tony Toews [MVP]" <ttoews@telusplanet.net> wrote in message 
news:e9nug5digbosjhso1vjf8brmj7tso70v3j@4ax.com...
> "Leslie Isaacs" <leslie@gppayroll.org.uk> wrote:
>
>>This is a re-post of a problem I posted a while ago, but to which I got no
>>suggestions: hopefully I'll be more lucky this time!?
>>
>>I have the following code in a Private Sub:
>>
>>If InStr([ResponseXML], "element") > 0 Then
>>errorfield = "Invalid " & Mid([ResponseXML], InStr([ResponseXML],
>>"element"), InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], 
>>"'")
>>+ 1, [ResponseXML], "'") - InStr([ResponseXML], "element") + 1)
>>Else
>
> One thing I'd do is simplify the code a bit.
>
> Dim ElementPosn as long
> ElementPosn = InStr([ResponseXML], "element")
>
> then change the above code to use ElementPosn
>
> errorfield = "Invalid " & Mid([ResponseXML], ElementPosn ,
> InStr(InStr(ElementPosn, [ResponseXML], "'")
> + 1, [ResponseXML], "'") - ElementPosn  + 1)
>
> Of course I don't have various brackets and such matched up but I
> suspect this might make it easier to figure out logic problems.
>
> Tony
> -- 
> Tony Toews, Microsoft Access MVP
> Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
> For a free, convenient utility to keep your users FEs and other files
>  updated see http://www.autofeupdater.com/
> Granite Fleet Manager http://www.granitefleet.com/ 


0
Leslie
11/27/2009 10:18:40 AM
Hi Leslie,

lets simplify this a bit by creating some variables -- this 
will also enable us to do testing

'~~~~~~~~~~
    dim mPosElement as integer _
       , mPosQuote1 as integer  _
       , mPosQuote2 as integer

    mPosElement = InStr([ResponseXML], "element")

    if mPosElement > 0 then
       mPosQuote1 = InStr( _
          mPosElement, [ResponseXML], "'")

       if mPosQuote1 > 0 then

          mPosQuote2 = _
            InStr(mPosQuote+ 1, [ResponseXML], "'")

          if mPosQuote2 > 0 then
             errorfield = "Invalid " _
                & Mid([ResponseXML] _
                , mPosElement _
                , mPosQuote2 - mPosElement + 1)
          end if
       end if
    end if
'~~~~~~~~~~~~~~~~~

I suspect that you got errors on records where the 2 quotes 
weren't found after "element" and you were not testing to 
make sure they were there before doing the assignment.  I do 
see an example of this with "... no element [children]..."

now why the query is forgiving ... well it uses something 
different to process the logic than VBA

Warm Regards,
Crystal
remote programming and training
http://MSAccessGurus.com

free video tutorials
http://www.YouTube.com/user/LearnAccessByCrystal

Access Basics
http://www.AccessMVP.com/strive4peace
free 100-page book that covers essentials in Access

  *
    (: have an awesome day :)
  *


Leslie Isaacs wrote:
> Hello All
> 
> This is a re-post of a problem I posted a while ago, but to which I got no
> suggestions: hopefully I'll be more lucky this time!?
> 
> I have the following code in a Private Sub:
> 
> If InStr([ResponseXML], "element") > 0 Then
> errorfield = "Invalid " & Mid([ResponseXML], InStr([ResponseXML],
> "element"), InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], "'")
> + 1, [ResponseXML], "'") - InStr([ResponseXML], "element") + 1)
> Else
> ...
> 
> Most of the time this works fine, but for some datastring values of
> [ResponseXML] I get
> Invalid procedure call or argument
> and the code stops on the 'errorfield = ...' expression. This has occurred
> where [ResponseXML] does contain the string "element" (obviously - otherwise
> the code wouldn't get past the condition into the expression!). The curious
> thing is that if I use the exact same errorfield expression in a query, on
> the same value of [ResponseXML], it returns the expected result (which is
> <Invalid Element 'TaxCodeAtLeaving'> - without the <>s). I could understand
> it if I'd just got duff syntax, but the fact that the query works ...?
> 
> In case it helps, one value of [ResponseXML] where this problem occurs is
> below.
> 
> Hope someone can help
> Many thanks
> Leslie Isaacs
> 
> 
> Problem value of [ResponseXML] follows:
> 
> ...................HTTP Text: 200 OK
> Request: submit_poll
> Response: submit_error
> CorrelationID: C3CFE512E3EB40D0B93A3A43A01348B1
> Info: : The submission of this document has failed due to departmental
> specific business logic in the Body tag.
> The submission of this document has failed due to departmental specific
> business logic in the Body tag.
> <?xml version="1.0"?><GovTalkMessage
> xmlns="http://www.govtalk.gov.uk/CM/envelope"><EnvelopeVersion>1.0</EnvelopeVersion><Header><MessageDetails><Class>IR-PAYE-MOV</Class><Qualifier>error</Qualifier><Function>submit</Function><TransactionID></TransactionID><CorrelationID>C3CFE512E3EB40D0B93A3A43A01348B1</CorrelationID><ResponseEndPoint
> PollInterval="10">https://secure.gateway.gov.uk/poll</ResponseEndPoint><GatewayTimestamp>2009-11-12T15:55:39.662</GatewayTimestamp></MessageDetails><SenderDetails
> /></Header><GovTalkDetails><Keys
> /><GovTalkErrors><Error><RaisedBy>Department</RaisedBy><Number>3001</Number><Type>business</Type><Text>The
> submission of this document has failed due to departmental specific business
> logic in the Body tag.</Text></Error></GovTalkErrors></GovTalkDetails><Body>
> <ErrorResponse xmlns="http://www.govtalk.gov.uk/CM/errorresponse"
> SchemaVersion="2.0">
> <Application>
> <MessageCount>2</MessageCount>
> </Application>
> <Error>
> <RaisedBy>ChRIS</RaisedBy>
> <Number>4085</Number>
> <Type>schema</Type>
> <Text>Value '0NT' doesn't have the correct format</Text>
> <Location>/hd:GovTalkMessage[1]/hd:Body[1]/mov:IRenvelope[1]/mov:InYearMovements[1]/mov:P45Part1[1]/mov:TaxCodeAtLeaving[1]</Location>
> <Application>
> <Messages xmlns="http://www.govtalk.gov.uk/validation/messages/1">
> <ServiceMessage>
> <UserText number="7674">Tax code entered is not a valid code.</UserText>
> </ServiceMessage>
> <DeveloperMessage>cvc-pattern-valid: Value '0NT' is not facet-valid with
> respect to pattern
> '([1-9][0-9]{0,5}[LPTVY])|(BR)|(0T)|(NT)|(FT)|(D0)|([K][1-9][0-9]{0,5})' for
> type '_intermediate_TaxCodeStructure'.</DeveloperMessage>
> </Messages>
> </Application>
> </Error>
> <Error>
> <RaisedBy>ChRIS</RaisedBy>
> <Number>4052</Number>
> <Type>schema</Type>
> <Text>Element 'TaxCodeAtLeaving' must only have valid text as its
> content</Text>
> <Location>/hd:GovTalkMessage[1]/hd:Body[1]/mov:IRenvelope[1]/mov:InYearMovements[1]/mov:P45Part1[1]/mov:TaxCodeAtLeaving[1]</Location>
> <Application>
> <Messages xmlns="http://www.govtalk.gov.uk/validation/messages/1">
> <ServiceMessage>
> <UserText number="7674">Tax code entered is not a valid code.</UserText>
> </ServiceMessage>
> <DeveloperMessage>cvc-complex-type.2.2: Element 'TaxCodeAtLeaving' must have
> no element [children], and the value must be valid.</DeveloperMessage>
> </Messages>
> </Application>
> </Error>
> </ErrorResponse>
> </Body>
> </GovTalkMessage>
> 
> 
> 
0
Crystal
11/30/2009 2:41:50 AM
Reply:

Similar Artilces:

Pass through query giving an invalid column error
I am trying to write a pass through query using Access 2000. My source table has a field that has three blank spaces as a place holder. I do not want or need records that have three blanks in this field as well as records numbered 840. I am trying to write an SQL statement that will eliminate those records from my query. I am using the following code: select [table].[field] from [table] WHERE ((Not ( [table].[field] )= "840" or Not ( [table].[field] )=" ")); I get an error at line 3 invalid column name '840' and ' '. I can remove the quote...

Questions On Calling Graphics via Cell Value
Thanks to a tip from Dave Peterson, he directed me to a site that has example code which I've included. There's also a link a the bottom of the referenced page to download a sample worksheet however it doens't appear to be working. (hangs) Here's the reference: http://www.mcgimpsey.com/excel/lookuppics.html Here's the code: Private Sub Worksheet_Calculate() Dim oPic As Picture Me.Pictures.Visible = False With Range("F1") For Each oPic In Me.Pictures If oPic.Name = .Text Then oPic.Visible...

Documents that are corrupt, invalid print options
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Ok, so occasionally we receive documents in xlsx format from an outside partner that cannot be opened by Excel 2008 for Mac, the error is &quot;The file might have been damaged or modified from its original format&quot;. <br><br>If you try to open this document in Excel 2007 for Windows, we get the following error, &quot;Excel found unreadable content in 'file name here.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Y...

Prompting for parameters in MSQuery to pass into a stored procedure
Good afternoon and thanks in advance for any advice. I'm trying to create a complicated query in MSQuery which prompts the user for certain parameters (eg product group, item code etc) and extracts the data from flat files on an SQL server database via ODBC. I have already discovered the limitations of MSQuery (my query joins multiple tables and there is a left outer join involved!) and have followed the advice already posted on this forum to create a stored procedure on my SQL server database, and reference the stored procedure from within my query, including input parameters. Everythi...

VBA Compile error: Procedure too large?
VBA in Exel came back with the following Compile error Message . . . Procedure too large. Is there any way to get around this problem? I have only three more cells to finish out of a total of 80 cells. Thank you Split the procedure in to two smaller procedures. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Jerry Dyben" <JerryDyben@discussions.microsoft.com> wrote in message news:62DF26E3-6C65-467D-80A7-A9E0BC3E90B7@microsoft.com... > VBA in Exel came back with the following Compile error Message > . . . &g...

Calling assembly from workflow
Hi, maybe you have faced problem like we have: Scenario: 1) There are two "Create" rules, both for invoice and custom entity that is related to the invoice (new_infocard) 2) Both the rules call my assemblies (one DLL for invoice and another for new_infocard) 3) New invoice is created programatically and right after that new_infocard, which points to this invoice, as well 4) First assembly (event on create for invoice) returns new generated number and workflow updates one attribute with this number 5) Second assembly (event on create for infocard) reads and updates some attribu...

Error Message R6025
I´m getting the error message (-R6025 - pure virtual function call-), and it shuts money down every time I try to import a statement downloaded from bank. It says the error is on the money.exe file. What do I do? Reinstall? In microsoft.public.money, Trevisan BR wrote: >I�m getting the error message (-R6025 - pure virtual function call-), and it >shuts money down every time I try to import a statement downloaded from bank. > >It says the error is on the money.exe file. > >What do I do? > >Reinstall? See if this helps: http://support.microsoft.com/kb/240437...

This delegate takes ParameterizedThreadStart takes an object but can be called wirhout parameter
Hi! The delegate ParameterizedThreadStart is declared as taking one parameter of type object and returning void like this public delegate void ParameterizedThreadStart(Object obj) So according to the delegate the method signature should be void ParameterizedThreadStart(Object obj) In this example when I use the method ThreadWorkWithParam which is based on the delegete ParameterizedThreadStart and look like this private static void ThreadWorkWithParam(object param) { .. . . } I call the method ThreadWorkWithParam without passing a argument I just call is like this t1.Start...

error 1327. invalid drive: f:\
I already had Office Ultimate downloaded on this computer but this week I also switched to windows 7. Now when I try to re install office I get this "error 1327. invalid drive: f:\" I have no idea what to do! Was this a clean install of win7 or an upgrade? "whoflungpoo6" <whoflungpoo6@discussions.microsoft.com> wrote in message news:ADCAA4F4-8C40-483D-B854-B3526C1C387B@microsoft.com... >I already had Office Ultimate downloaded on this computer but this week I > also switched to windows 7. Now when I try to re install office I get this > "er...

OUTLOOK caused an invalid page fault in module KRNL386.exe
I am running Windows 98 I have done all the updates via windowsupdate.microsoft.com. I have Outlook 2000 that I am using for e-mail and have run all the updates for this from officeupdates.microsoft.com. The problem I am having is that EVERYTIME I try to reply to a message I receive the following error : OUTLOOK caused an invalid page fault in module KRNL386.exe.....and Outlook locks up. I have tried to repair it and also tried to reinstall it with NO success. Please help....Thanks ahead of time for your attention to this matter ...

CListCtrl derived class DestroyWindow not called in a Model Dialog
Hi All, I have Derived a class from CListCtrl, and show in a Model Dialog. Upon the dialog exit, I need to do some cleanup. In a modeless dialog, I can do the cleanup in the distructor of the derived CListCtrl class, but I can't do that in a Model Dialog. Because in a Model Dialog the windows object is deleted before the destructor of the ListCtrl is called. I am trying to override the DestroyWindow function, but it is not called by default as well. May I know which other function I can override just to do some cleanup. Thanks in advance. <ckkwan@my-deja.com> wrote in message...

system calls
Is it possible to make system calls without a DOS box/command windows popping up? I'm making calls with the system function which always seems to cause this. I'm using various console applications. Anyway to avoid the windows popping up? Or at least have them behind the main window? Or even just in one place so the don't dance all over the screen? Cheers, K You can use CreateProcess and redirect the outputs. ex: you can create a cmd file, and put your command(s) into and then start all the stuff and get the output. sample source code: BOOL CmdRun(LPSTR lpszCmd, LPSTR *...

problem with calling mfc dll from #C
Hi All, Debug Assertion Failed File dbgheap.c _CrtIsValidHeapPointer() I get the above while trying to CGAL::Intersection(Polygon_2 , Polygon_2,std::back_inserter(...)) in a MFC DLL project (Visual Studio .Net 2003) I call it from C# project. What to do to fix my project? Please Help Thanks Miki How are you calling the MFC dll? Is it managed code with MFC or simply an COM server which has been imported in managed code? Also, you are better off posting this in dotnet.vc newsgroup. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "miki" <mich...

calling base class member functions from destructor
I have CMyCheckListBox : public CCheckListBox. In destructor I need to call two base class member functions: GetCount GetItemDataPtr But When destructor executes line with first function Debug Assertion Failed Dlg displays: Program:.... File:.... When I try to debug, I see that code is stopped on function: AFXWIN_INLINE int CListBox::GetCount() const { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETCOUNT, 0, 0); } My question: Is any way to call base class member function from destructor ? Thanks ! Peter "Peter" <pskvarka@kerio.com> wrote in message...

Error 9060 during CreateZipFile procedure
This error occurs on one of three workstations. -- Gene Rhine Hi Gene, I just got the same problem and I uninstall the FRx service pack and the software, then reinstall it again with SP4 . Somehow it work. Hope it help. Vu "Gene Rhine" wrote: > This error occurs on one of three workstations. > -- > Gene Rhine ...

What is the step-by-step procedure for making a data list?
I've read and re-read how to do datalists, but I cannot get the hang of how to make one and apply it. I need a simple tutorial in how to make one, from A to Z. I want to call in items that have cost associated with them instead of typing them each and every time. Any GOOD help will be greatly appreciated. Try Debra's nice coverage on VLOOKUP at her: http://www.contextures.com/xlFunctions02.html -- Rgds Max xl 97 --- GMT+8, 1� 22' N 103� 45' E xdemechanik <at>yahoo<dot>com ---- "Bobgolfs56" <Bobgolfs56@discussions.microsoft.com> wrote in me...

Access the call stack
In a debug build, is there a way for me to get a list of functions on the call stack? I.e., I have a function that is getting passed incorrect data and I want to display the call stack so I can find out who called this function. Oh yeah, this is happening on a beta tester's computer, so I can't just set a breakpoint. Note it is NOT crashing so I don't really need the post mortem Watson-type setup... I am hoping there is a call that gets the call stack info... Thanks, Steve > In a debug build, is there a way for me to get a list of functions on > the call stack? I.e., I h...

Minor puzzle: some UDF calls respect mixed case, others insist on lower case
I have a bunch of UDFs that I have used for years hundreds of times in several workbooks. The names of the UDFs in the add-in modules are coded in mixed case (RayleighMean, RndTallyLog, & ExpSF). Up until a few days ago, whenever I would code a UDF call in a cell (=ExpSF(...)), Excel would change the name to lower case (=expsf(...)). I recall trying repeatedly to get Excel to leave it in mixed case. A few days ago, I wrote a new UDF called FmtTime. I just noticed that all of the calls to this one function are in mixed case just like I entered them. In fact, if I try to change...

Making form based on stored procedure
I have an Access ADP and a SQL Server database. I am a newbie with SQL Server and ADP. I'm trying to make a form that will update a SQL Server table using a stored procedure that I have created. How do I go about this? Do I need code? I noticed that I can make a query by going into the record source very similarly to an Access query and it works. But I don't want a regular query, I want a stored procedure. Can anyone explain it? I'm using Access 2007 and SQL Server 2008 Express. ...

Error when debugging stored procedure
Hello, I've created an ASP.NET website and I'm trying to debug the stored procedure from VS 2008 as described here: http://articles.techrepublic.com.com/5100-10878_11-5161626.html. I used to do this in the past without any problems, but now, when I set a breakpoint in the stored procedure, I get an error: "The breakpoint will not currently be hit. No symbols have been loaded for this document". This is a pretty common error and could have many causes, but I'd never seen it when debugging the stored procedure. Now I'm getting this message in the stor...

how to send an xml dataset to a Stored Procedure in mssql
how to send an xml dataset to a Stored Procedure in mssql I have an xml file that I read into a dataset. and I'm trying to use a stored procedure (see SPROC #1 below) that inserts this xml dataset into an sql table via OpenXML. Nothing gets inserted into the sql table except nulls, so I think that perhaps I'm not actually sending the (xml) dataset to the SPROC. The code below fails on this line: sqlCommand1.ExecuteNonQuery(); (The SPROC works fine when I run it in Query Analyzer and SET the xml file directly as a string. See the SPROC #2 below) What do I need to do to send t...

Calling the messagehandler
Hy! I want to realise something like that void CSMCServerDlg::OnEndServer() { if(m_server->EndServer()==S_OK) // in EndServer another message is send { // it would be fine to call the messagenhandler here and wait till the message from EndServer is processed. ... } } How could this be done? Because as long as i stay in OnEndServer no window messages will be proccessed. ...

Line accounts are missing or invalid
Working in GP 9.0 I get these messages: The following errors were found while attempting to post: **One or more line items contain warnings or errors. **ERROR: Line accounts are missing or invalid. These occur when trying to post from Invoice Entry. Transactions > Sales > Invoice Entry Any help would be greatly appreciated. ...

Procedure to list subs and fuctions in a custom xla
I am looking for a routine to list the subs and fuctions in an add-in that I always load. Wanted a quick way to list the custom fuctions I have written over the years. It seems like VBAproject and VBAcomponents should come into play but I cant seem to get anything to work. Any ideas? Thanks On chip pearson's webpage ('Programming In The VBA Editor' (http://www.cpearson.com/Excel/vbe.aspx)) There is a section labeled : Listing All Modules In A Project -- joel ------------------------------------------------------------------------ joel's Profile: ...

how can i call the copy command of Windows or Drag and Drop in VC+
how can i copy a file or directory in vc++? how can i call the copy command of Windows or Drag and Drop in VC++? thanks! You would not want to "call the copy command". That is an obsolete Unix-Mind-Set approach to problem solving. What you want to do is copy a file. There are two options available. For simple file copy, you can simply call the CopyFile API. That way, when it fails, you will be able to determine EXACTLY why it failed, and either perform appropriate recovery or give the user a USEFUL error message as to what happened. The other option, a good deal more complex, is to...