Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 544
  • Last Modified:

What's the value of "special effect" = "Raised" for a check box in VBA for a report?

I want to set the special effect to "Raised" in certain conditions. How do I say that?

Additionally, how would I find this out in Help without having to ping EE?

Here's what I want:

If MainStreetFlag = "*" then

    Me.MainStreet.SpecialEffect = "Raised"
else
   Me.MainStreet.SpecialEffect = "Flat
end if

Thanks.

Bill

0
Alaska Cowboy
Asked:
Alaska Cowboy
  • 6
  • 5
  • 3
1 Solution
 
flavoCommented:
Type into Mr Paper Clip "special effect" while in the VBE

FROM VBA HELP

Setting Visual  
Flat 0  
Raised 1
Sunken 2
Etched 3  
Shadowed 4
Chiseled 5


EXAMPLE

If MainStreetFlag = "*" then

    Me.MainStreet.SpecialEffect = 1 '"Raised"
else
   Me.MainStreet.SpecialEffect = 0 '"Flat
end if

Dave :-)
0
 
jjafferrCommented:
Flat 0 The object appears flat and has the system's default colors or custom colors that were set in Design view.
Raised 1 The object has a highlight on the top and left and a shadow on the bottom and right.
Sunken 2 The object has a shadow on the top and left and a highlight on the bottom and right.
Etched 3 The object has a sunken line surrounding the control.
Shadowed 4 The object has a shadow below and to the right of the control.
Chiseled 5 The object has a sunken line below the control.
0
 
Alaska CowboyAuthor Commented:
Dave,

thanks, and . . . I'd love to meet Mr. Paper Clip. How do I meet him????

Bill
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
flavoCommented:
That stupid paper clip in Office....

Help -> Show Office Assistant..

Maybe you turned him into the Wizard or the Dog?
0
 
Alaska CowboyAuthor Commented:
Doesn't work - nothing changes at all.

Here's what I'm doing:

  If Me.MainStFlag = "*" Then
        Me.Check107.SpecialEffect = 4
        Me.Check111.SpecialEffect = 4
        Me.Check107.BorderColor = 255
        Me.Check111.BorderColor = 255
    Else
        Me.Check107.SpecialEffect = 0
        Me.Check111.SpecialEffect = 0
        Me.Check107.BorderColor = 0
        Me.Check111.BorderColor = 0
    End If

No color or effects change at all.
   
0
 
flavoCommented:
Works for me....

Are you sure the value MainStFlag  is exactly * ?
0
 
jjafferrCommented:
I don't think you can use these effects with a checkbox
0
 
flavoCommented:
I got a red Shadow... I thought the same thing Jafer....

Gave it a whack, and she worked.... I'm using A2003, so that maybe something new?
0
 
Alaska CowboyAuthor Commented:
Flavo,

I'll keep trying, seems straight froward. Could you post your code?

Thanks
0
 
flavoCommented:
Not exactly the same

Private Sub Command0_Click()
Me.Check1.BorderColor = 255
Me.Check1.SpecialEffect = 4
End Sub

Private Sub Command3_Click()
Me.Check1.BorderColor = 0
Me.Check1.SpecialEffect = 0
End Sub

I just had a little play, and it seems it will only work if you go into the form design mode and set it to red and shadowed there... then it will change between them.... strange!
0
 
Alaska CowboyAuthor Commented:
Terribly sorry . . . I am trying this in a report . . .

My apologies.
0
 
flavoCommented:
Doesnt look like you can... makes no difference... Another bug to add to the list....
0
 
Alaska CowboyAuthor Commented:
Thanks for your help. I learned some nuances.

Bill
0
 
jjafferrCommented:
But you can do something else instead,
do your own (Or you can search the Internet) Raised check button, How?
While in the Form, Do a print screen where you have both Raised and Flat checkboxes,
then in an image processing program like photoshop (the freeware www.irfanview.com can do the cropping too), cut the 2 images to the exact size, and call them:
ChkRaided.jpg and ChkFlat.jpg
In the Report, in place of the checkbox, use an image OLE object,
Now you can apply a similar if statment to make the Report use either based on the criteria.

I can see my graphics background becomes handy sometimes.

jaffer
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 6
  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now