473,405 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

triple state toggle button problem (Access 97)

Hi folks.

I have a form, frmHistory, which has 3 toggle buttons (1 of which is
tglName, which I will be using to demonstrate my problem). The buttons
are used to sort the form (explanations below). I have set the
button's "Triple State" value to Yes, and the default value to False.
Here is the macro that I used for tglName (I assigned the macro to the
button's On Click event):

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Condition: Not [Screen].[ActiveControl]
Action: SetValue
Item: [Screen].[ActiveForm].[OrderBy]
Expression: ""

Condition: IsNull([Screen].[ActiveControl])
Action: SetValue
Item: [Screen].[ActiveForm].[OrderBy]
Expression: "frmHistory.MemName"

Condition: [Screen].[ActiveControl]
Action: SetValue
Item: [Screen].[ActiveForm].[OrderBy]
Expression: "frmHistory.MemName DESC"
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I also assigned a macro to the form's On Open event:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Action: SetValue
Item: [Forms]![frmHistory].[OrderBy]
Expression: ""

Action: SetValue
Item: [Forms]![frmHistory].[OrderByOn]
Expression: True
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=

When I open the form, the form isn't sorted, which is how it should
be; when I click tglName, the form is sorted by name in ascending
order; when I click tglName again, the form is sorted in descending
order; and when I click it one final time, the form will be like it
was before, i.e. not sorted at all. So far so good. The problem begins
when I click tglName yet again - the form doesn't sort at all. The
same problem occurs in the other 2 buttons - when I've gone through a
full "loop" with whichever 1 button, the other 2 doesn't work. Any
ideas of what went wrong? Thank you (and my apologies if things are a
bit confusing).
Nov 12 '05 #1
0 2268

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Neil Coleclough | last post by:
I am constructing a database to process product returns for my Company. I have a number of toggle buttons to identify the stage to which each return has been processed. For example, clicking the...
2
by: Mel | last post by:
Hi, is there any way I can implement toolstrip toggle button simular to the MS Word alignment button? if one toggle button already pressed down, if user click on the "pushed down button", the...
1
by: Wayne | last post by:
Not sure if anyone else has noticed this, but it gets around one of the more annoying limitations of using themed controls. Normally when using themed controls a triple state check box looks the...
1
by: Mike | last post by:
Hi all, Hum i just erased the whole message by mistake, :( Ok so i want to hide a specific field in an Access form using a toggle button, but i cant seem to get the right syntax. Right now im...
70
by: Anson.Stuggart | last post by:
I'm designing a debounce filter using Finite State Machine. The FSM behavior is it follows the inital input bit and thinks that's real output until it receives 3 consecutive same bits and it...
5
JustJim
by: JustJim | last post by:
Hi All I have a little application I'm working on for the local Department of Education. There is a "Main Menu" form that has a toggle button on it to show/hide the Database Window. When it is...
2
by: Chuck | last post by:
How can I make an array of command buttons (or toggle buttons) on a form and have a text box on the same form display the index of the button clicked? This works very well in VB6, but I can't...
1
by: ll | last post by:
I'm currently working on a form which consists of a show and hide javascript. The toggle works fine, although when I click on submit, I would like the page to reload with the toggle (show/hide)...
0
by: ARC | last post by:
Hello all, In access 2007, it appears you cannot put a toggle button underneath a menu id and have it show a Pressed / Not Pressed status. If you make the toggleButton ID as part of the main...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.