Showing posts with label block. Show all posts
Showing posts with label block. Show all posts

Monday, February 20, 2012

Object variable or With block variable not set (was "Frank")

When trying to upsize an access database to sql server using the upsize wizard, I get the following error:
"Object variable or With block variable not set."
Any assistance is greatly appreciated.sounds like an error in the vb code. try compiling in the vba window in access and see if it kicks out any errors. i have never used the upsizing wizard and I am not sure why sql server would care about the VBA|||Upsizing wizard creates an updateable recordset using DAO (!!!) and then attempts to insert rows using rs.AddNew...rs.Update sequence within a loop over the source. The error posted means that there was a failure to create a target recordset, most likely due to datatype incompatibility (this is all most likely unless some silly things are happaning like intermittent network connectivity failures and such).|||Thanks all for most helpful comments. Not too sure how to correct this in order to get a target recordset in that this is my first time doing this.

Any further comments welcomed.

Thanks once again for your time and effort in assistingme.

Object variable or With block variable not set

I was wondering if you have any knowledge of what I can be doing wrong.
Basically, here is what I want to do in SQL Reporting Services:
If field: Fields!Opportunity_Won_Loss_Open.Value = "Open" then SUM the
value for this field: Fields!Opportunity_EstRev
Here is the syntax I am using:
=SUM(Fields!Opportunity_EstRev.Value
(iif(Fields!Opportunity_Won_Loss_Open.Value = "Open",
Fields!Opportunity_Won_Loss_Open.Value, Nothing)))
When I run it, it returns an error: "Object variable or With block
variable not set."
I know independently that each separate syntax works because I have
them working in the same report:
=SUM(Fields!Opportunity_EstRev.Value)
=COUNT(iif(Fields!Opportunity_Won_Loss_Open.Value = "Open",
Fields!Opportunity_Won_Loss_Open.Value, Nothing))
When I try to combine them, they don't work. Logically, they make
sense to me combined, but I am sure I am messing up the syntax
somewhere. Would you have an idea? Any help would be greatly
appreciated
try:
=SUM(iif(Fields!Opportunity_Won_Loss_Open.Value = "Open",
Fields!Opportunity_EstRev.Value, 0))
=COUNT(iif(Fields!Opportunity_Won_Loss_Open.Value = "Open",1, Nothing))
=SUM(iif(Fields!Opportunity_Won_Loss_Open.Value = "Open", 1, 0))
-oj
<hendrix.craig@.gmail.com> wrote in message
news:1144162065.659636.72790@.j33g2000cwa.googlegro ups.com...
>I was wondering if you have any knowledge of what I can be doing wrong.
> Basically, here is what I want to do in SQL Reporting Services:
> If field: Fields!Opportunity_Won_Loss_Open.Value = "Open" then SUM the
> value for this field: Fields!Opportunity_EstRev
> Here is the syntax I am using:
> =SUM(Fields!Opportunity_EstRev.Value
> (iif(Fields!Opportunity_Won_Loss_Open.Value = "Open",
> Fields!Opportunity_Won_Loss_Open.Value, Nothing)))
> When I run it, it returns an error: "Object variable or With block
> variable not set."
> I know independently that each separate syntax works because I have
> them working in the same report:
> =SUM(Fields!Opportunity_EstRev.Value)
> =COUNT(iif(Fields!Opportunity_Won_Loss_Open.Value = "Open",
> Fields!Opportunity_Won_Loss_Open.Value, Nothing))
> When I try to combine them, they don't work. Logically, they make
> sense to me combined, but I am sure I am messing up the syntax
> somewhere. Would you have an idea? Any help would be greatly
> appreciated
>

Object variable or With block variable not set

I was wondering if you have any knowledge of what I can be doing wrong.
Basically, here is what I want to do in SQL Reporting Services:
If field: Fields!Opportunity_Won_Loss_Open.Value = "Open" then SUM the
value for this field: Fields!Opportunity_EstRev
Here is the syntax I am using:
=SUM(Fields!Opportunity_EstRev.Value
(iif(Fields!Opportunity_Won_Loss_Open.Value = "Open",
Fields!Opportunity_Won_Loss_Open.Value, Nothing)))
When I run it, it returns an error: "Object variable or With block
variable not set."
I know independently that each separate syntax works because I have
them working in the same report:
=SUM(Fields!Opportunity_EstRev.Value)
=COUNT(iif(Fields!Opportunity_Won_Loss_O
pen.Value = "Open",
Fields!Opportunity_Won_Loss_Open.Value, Nothing))
When I try to combine them, they don't work. Logically, they make
sense to me combined, but I am sure I am messing up the syntax
somewhere. Would you have an idea? Any help would be greatly
appreciatedtry:
=SUM(iif(Fields!Opportunity_Won_Loss_Ope
n.Value = "Open",
Fields!Opportunity_EstRev.Value, 0))
=COUNT(iif(Fields!Opportunity_Won_Loss_O
pen.Value = "Open",1, Nothing))
=SUM(iif(Fields!Opportunity_Won_Loss_Ope
n.Value = "Open", 1, 0))
-oj
<hendrix.craig@.gmail.com> wrote in message
news:1144162065.659636.72790@.j33g2000cwa.googlegroups.com...
>I was wondering if you have any knowledge of what I can be doing wrong.
> Basically, here is what I want to do in SQL Reporting Services:
> If field: Fields!Opportunity_Won_Loss_Open.Value = "Open" then SUM the
> value for this field: Fields!Opportunity_EstRev
> Here is the syntax I am using:
> =SUM(Fields!Opportunity_EstRev.Value
> (iif(Fields!Opportunity_Won_Loss_Open.Value = "Open",
> Fields!Opportunity_Won_Loss_Open.Value, Nothing)))
> When I run it, it returns an error: "Object variable or With block
> variable not set."
> I know independently that each separate syntax works because I have
> them working in the same report:
> =SUM(Fields!Opportunity_EstRev.Value)
> =COUNT(iif(Fields!Opportunity_Won_Loss_O
pen.Value = "Open",
> Fields!Opportunity_Won_Loss_Open.Value, Nothing))
> When I try to combine them, they don't work. Logically, they make
> sense to me combined, but I am sure I am messing up the syntax
> somewhere. Would you have an idea? Any help would be greatly
> appreciated
>