473,387 Members | 1,464 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,387 software developers and data experts.

Reset Option Group

35 32bit
I have an option group that filters a subform. It is filtering correctly except that when I select a value and close the database, it filters on that same value instead of the default when I open the database again.

So for example -- the default is All. I select Pre Installed and the subform is filtered correctly. I close the database and re-open. The subform is still filtered for Pre Installed records although the All button is selected correctly.

Here is the code for the on click event. The Accounts query is an append query. I am trying to work on someone elses DB and it has been over 10 years since I had VB. I know it is probably something simple.

Expand|Select|Wrap|Line Numbers
  1. CurrentDb.Execute ("Delete * from AccountList")
  2. DoCmd.SetWarnings False
  3. DoCmd.OpenQuery ("QryAccounts")
  4. DoCmd.SetWarnings True
  5.  
  6. Forms!Default!NavigationSubform.Requery
  7.  
Thanks.
Aug 24 '14 #1
4 1563
jimatqsi
1,271 Expert 1GB
The obvious question would be is the option group bound to some data item? And barring that, what references to this option group are there in the code? Anything that might be trying to apply a value to the group?

For an override, you could try setting the option group to the default in the OnClose event of the form.

Jim
Aug 24 '14 #2
NeoPa
32,556 Expert Mod 16PB
Rhonda.

Your question is about the filtering being saved with the form design, yet the code you include isn't related to that??

Please post the relevant code and we can help you figure out the problem.

How to Close a Main Form Without Saving Changes of any Subforms may be of interest.

Fundamentally you really don't want to allow design changes to be saved to the object when it closes. If we could see what you're actually doing we could offer more focused advice, but that's the general point you need to consider.
Aug 24 '14 #3
rhonda6373
35 32bit
Thanks everyone for the input! I did figure this out.
Sep 1 '14 #4
zmbd
5,501 Expert Mod 4TB
rhonda6373
Would you mind sharing?
Sep 2 '14 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Georges Heinesch | last post by:
Hi. I created an option group using the wizard. I included 3 option buttons. An option group (in general) can be enabled or disabled completely (includung option buttons and their respective...
2
by: Corrine | last post by:
Is there a way to cancel a change in an option group? The option group still changes to the option clicked on when clicking on the NO button with the following code in the BeforeUpdate event of the...
2
by: Charles | last post by:
Ok, so I'm creating a form on the fly. I can create the option group, I can create the checkboxes, but I can't figure out how to bind them to the option group I'm creating them within. I was...
11
by: MLH | last post by:
Why is that? If I choose the tiny check boxes which are hard to hit with a mouse, it works fine. But option buttions, shich can be sized big enough for people with limited sight and dexterity...
2
by: Chuck Insight | last post by:
Hi All, The table underlying this form has three yes/no fields that refuse to work as selections within my option group. How can I make this happen? Thanks very much, Chuck
5
by: tsnyder | last post by:
I need to have an option button that allows editing to a field only when it is checked.
3
by: El | last post by:
I can get a total count for a whole option group field, but I need to be able to count each individual selection in an option group on a report. For example if I had a yes or no option...I would...
7
by: sparks | last post by:
When you enter an option group you can move to each option with the arrow keys and select with the space bar. Option groups don't have keydown events so has anyone come up with a way to allow...
2
by: jarekz | last post by:
Hello friends. This is my first post here. Please forgive me any mistakes. Could you help me solve the problem that I have in MS Access 2003? I downloaded this template from Microsoft:...
3
by: DanicaDear | last post by:
I am using a set of options groups with some code that puts the text (rather than the typical 1,2,3, etc) into the table. I got the directions from this post:...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.