473,721 Members | 3,997 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Option Groups and updating form

71 New Member
I've got an option group with 5 options, with no default value. Whenever I open the form and scroll through records all of the options are grey'd, unless the user selects one.

What I would like to do is have the option group display the current value of the options, depending on the record being viewed. So that as you scroll through records whatever option is currently selected (based on the table) for that record is already selected in the option group.

I've got an if statement setup that *should* handle this, but I'm not sure where to place the code. I've tried to use form_activate() and form_AfterUpdat e(), but niether seems to work. Can anyone help me with where I should put code like this?
Aug 9 '07 #1
6 2399
Rabbit
12,516 Recognized Expert Moderator MVP
Set the control source of the option group to the field in the table and you won't need any code.
Aug 9 '07 #2
rsteph
71 New Member
The problem I have there is the way the option group works.

The field that the option group refers to has to be a text field, but option groups can only return numbers. So I have the option group unbound, and then have an invisible textbox that stores a specified string based on the number returned from the option group.
Aug 9 '07 #3
Rabbit
12,516 Recognized Expert Moderator MVP
What about having a look up table instead and storing the number rather than the text? It'll save you space in the long run with the benefit of making your form simpler. No need for code and you can get rid of that hidden text box.
Aug 9 '07 #4
rsteph
71 New Member
sorry didn't mean to double post
Aug 9 '07 #5
rsteph
71 New Member
The way things are set up right now, I've got an option group with 5 options, representing folders where a file is stored. The database is then linked to a webpage, and that field is used along with the name of the file to create a hyperlink to the file.

One of the options I have is an "other" option, that has a textbox next to it that allows the user to input in a specified folder. That was in the future if we add a new folder to store files in, the form would still work.
Aug 9 '07 #6
Rabbit
12,516 Recognized Expert Moderator MVP
Well, the design difficulties aside.

If your if code works, then you'll need to put it in the after update event of the option group and the on current event of the form.
Aug 9 '07 #7

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

Similar topics

10
4879
by: David | last post by:
Can anyone give me a quick code snippet (that is standards-based) for adding OPTION tags to a SELECT dynamically. I have no problem doing it in IE but I am kind of new to the whole standards world and can't figure out how to make it work in, for instance, Firefox. Right now the code I am using is as follows: newOpt=document.createElement('OPTION'); newOpt.id='optKeyword'; newOpt.label='Keyword';...
4
2443
by: Y Plas | last post by:
Hello all, i'm a new user in this group and was wandering if anyone could assisst me with a problem: I have a form with option groups within it outputig their results to a table called tblTNAform, with contain a very, very large number of fields linked to option groups. My problem is that i wish to display these results as text, not numbers, and i've run out of ideas. The results of the form may be stored as a number in the tables but...
5
14848
by: | last post by:
Hi guys, I have a form that I am using option groups on.. how can i make each option group a multi select ? thanks, kevin
11
4815
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 to hit - they don't work at all. Its true. I created 'em with the built-in wizard furnished with Access 97 but they do not work. I put 12 of 'em in the group, labeled the months of the year and giving
20
5160
by: PC Datasheet | last post by:
How can the label for a checkbox and the labels for the options in an option group be addressed? When a checkbox gets the focus, Access draws a dotted box around the label. When an option group gets the focus, Access draws a dotted box around the label of the first option or the label of the option previously selected. I would like to change the backcolor of these labels to yellow as the controls get focus. For textboxes and comboboxes I...
4
3532
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The objective in utilizing this new deployment method is to reduce the maintenance overhead as well as making it easier for my users to setup and run the application initially. I have VS 2002, Windows XP, Access XP(2000 format). He is my problem....
0
3055
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The objective in utilizing this new deployment method is to reduce the maintenance overhead as well as making it easier for my users to setup and run the application initially. I have VS 2002, Windows XP, Access XP(2000 format). He is my problem....
1
4506
by: Stephen D Cook | last post by:
In my form I have an option group with 3 option buttons. My form is tied to a table. the options are Temp, Permanent and Overtime. I have these inside a frame. I have an AddRecord button to enter the data into the table. After the record is Added the option buttons are emptied. I want to require the person to click one of the option buttons, which enters the type of employee it is. In the click event of the AddRecord button I have the...
2
2468
by: weston | last post by:
I have a form that has multiple option groups on it. When I created the form I copied the option groups and then changed the data source for them. But there now doesn't seem to be a caption for any of the copied option groups. I need to refer to the caption property of these groups for a data checking code. I have looked on the properties page but caption is not on the list any more. I have put a caption on the variable in the table design...
0
8852
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8736
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9373
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9227
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9145
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8020
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4497
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4761
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2590
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.