Group:  Microsoft Access ยป microsoft.public.access.activexcontrol
Thread: use of toggle button

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

use of toggle button
Maredith 04.11.2005 01:25:06
I would like to use a button on a form for applying/deleting a filter. The
form would be based on a table that has a yes/no field called "Active". When
the form opens, only records with a value of "yes" in the active field will
display. If the user presses the button, I want all records displayed. I can
do that with a regular command button, but i thought I wanted a toggle button
that would display as depressed when the filter is on, up when displaying all
records. Can i do that?
Re: use of toggle button
"Alex Dybenko" <alexdyb[ at ]PLEASE.cemi.NO.rssi.SPAM.ru> 04.11.2005 03:03:29
Yes, you can do this
add a toggle button, then add following code:

if me.Toggle1=true then
'pressed
me.filter="ActiveField=true"
me.filteron=true
else
me.filteron=false
end if

--
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com



"Maredith" <Maredith[ at ]discussions.microsoft.com> wrote in message
news:0BB1642D-6AF8-4B5D-A006-9544023C8115[ at ]microsoft.com...
[Quoted Text]
>I would like to use a button on a form for applying/deleting a filter. The
> form would be based on a table that has a yes/no field called "Active".
> When
> the form opens, only records with a value of "yes" in the active field
> will
> display. If the user presses the button, I want all records displayed. I
> can
> do that with a regular command button, but i thought I wanted a toggle
> button
> that would display as depressed when the filter is on, up when displaying
> all
> records. Can i do that?


Re: use of toggle button
Maredith 25.11.2005 19:56:02
Hi Alex,

Thanks! I apologize for taking so long to respond. I thought I checked a
couple times and didn't see your response. Yes that worked but I can't figure
out how that's different from what i tried ;-)

"Alex Dybenko" wrote:

[Quoted Text]
> Yes, you can do this
> add a toggle button, then add following code:
>
> if me.Toggle1=true then
> 'pressed
> me.filter="ActiveField=true"
> me.filteron=true
> else
> me.filteron=false
> end if
>
> --
> Alex Dybenko (MVP)
> http://alexdyb.blogspot.com
> http://www.PointLtd.com
>
>
>
> "Maredith" <Maredith[ at ]discussions.microsoft.com> wrote in message
> news:0BB1642D-6AF8-4B5D-A006-9544023C8115[ at ]microsoft.com...
> >I would like to use a button on a form for applying/deleting a filter. The
> > form would be based on a table that has a yes/no field called "Active".
> > When
> > the form opens, only records with a value of "yes" in the active field
> > will
> > display. If the user presses the button, I want all records displayed. I
> > can
> > do that with a regular command button, but i thought I wanted a toggle
> > button
> > that would display as depressed when the filter is on, up when displaying
> > all
> > records. Can i do that?
>
>
>
Re: use of toggle button
"Alex Dybenko" <alexdyb[ at ]PLEASE.cemi.NO.rssi.SPAM.ru> 26.11.2005 06:52:21
Hi Maredith,
well, i can't say why it did not work, until i see code you tried <g>

--
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


"Maredith" <Maredith[ at ]discussions.microsoft.com> wrote in message
news:70D2A21B-B235-49A3-A661-B33BAFBE98A5[ at ]microsoft.com...
[Quoted Text]
> Hi Alex,
>
> Thanks! I apologize for taking so long to respond. I thought I checked a
> couple times and didn't see your response. Yes that worked but I can't
> figure
> out how that's different from what i tried ;-)
>
> "Alex Dybenko" wrote:
>
>> Yes, you can do this
>> add a toggle button, then add following code:
>>
>> if me.Toggle1=true then
>> 'pressed
>> me.filter="ActiveField=true"
>> me.filteron=true
>> else
>> me.filteron=false
>> end if
>>
>> --
>> Alex Dybenko (MVP)
>> http://alexdyb.blogspot.com
>> http://www.PointLtd.com
>>
>>
>>
>> "Maredith" <Maredith[ at ]discussions.microsoft.com> wrote in message
>> news:0BB1642D-6AF8-4B5D-A006-9544023C8115[ at ]microsoft.com...
>> >I would like to use a button on a form for applying/deleting a filter.
>> >The
>> > form would be based on a table that has a yes/no field called "Active".
>> > When
>> > the form opens, only records with a value of "yes" in the active field
>> > will
>> > display. If the user presses the button, I want all records displayed.
>> > I
>> > can
>> > do that with a regular command button, but i thought I wanted a toggle
>> > button
>> > that would display as depressed when the filter is on, up when
>> > displaying
>> > all
>> > records. Can i do that?
>>
>>
>>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net