Option Buttons

wiltz

Registered User.
Local time
Today, 03:31
Joined
Jun 11, 2007
Messages
14
I have 2 Option Buttons on my form... the 1st option button filters out the data below to show only work orders in progress.... the 2nd option button is set up to show all current and work orders in the past...

my problem is that you can select or de-select both buttons... I want to set it up so when you select the top button then the 2nd button is de-selected automatically and visa versa
 
You should have selected an Option Group instead of individual radio buttons. Then you check the value of the option group instead and it will also automatically select one or the other but not both.
 
Use the option group for this!!
 
Great, thanks for the help, but.....

Now I cant seem to get these buttons to filter the results in the same form that are displayed below... I want one radio button when selected to show all records and the other button to show only quotes in progress.... the following code for that should look like this......

![Ordered]=Yes &
![Invoiced]=No &
![Customer Received Goods]=No

but where do I enter this now.... sorry i know this should be easy but im new at this and cant figure it out (im using access 2007)
 
The code should look like this:
Code:
Private Sub YourOptionFrameNameHere_Click()
   If Me.YourOptionFrameNameHere = 1 Then
       Me.Filter = "[Ordered]= True"
       Me.FilterOn = True
   Else
       Me.Filter = "[Customer Received Goods]= False"
       Me.FilterOn = True
   End If
End Sub
 
ummm.... I named the option group as " Main_Filter "

I opened the form in design view
opened the "property sheet" and selected my "main filter"
under the "event" tab clicked on the "event procedure" next to the "On Click"

This opened up the Microsoft Visual Basic program
I entered in the code here at the end of the existing code and didnt receive an error

now when i run the program I still do not receive and error... but the data doesnt filter... nothing really happens

any ideas???
 
Can you post your database? (remembering of course to compact first - TOOLS > DATABASE UTILITIES > COMPACT AND REPAIR and then zipping with WinZip, or something like it). The file size should be 393KB or less to post here. If not, we can arrange for you to email it to me to look.
 
what version should I be saving this file in.... Im running 2007 and have the option of saving the file to be compatible with 2002-2003 or 2000
 
what version should I be saving this file in.... Im running 2007 and have the option of saving the file to be compatible with 2002-2003 or 2000

dumbing it down to 2002 or 3 or even 2000 will give more users the opportunity to help you
 
You can save it as 2000, which would give more people the ability to use it and come back with info. But, if you have used features within Access 2007 that aren't in previous versions, then you might need to stay with the A2K7 format.

But, post it in 2000 mode and see what happens. You can always repost it later in 2007 mode if it works in 2000 but not in 2007.
 

Attachments

Okay, I got the filter to work for you. As for your other problem, I would first change all of the field names that have # in them because you should not use special characters in field or object names as that can cause you a lot of pain and suffering as those characters mean something. In this case the # is a date delimiter. Try changing the field names to something like FieldNum instead of Field#. Also, remove spaces from your field and object names. It will help you out so you don't have to bracket everything everywhere.
 

Attachments

Users who are viewing this thread

Back
Top Bottom