473,554 Members | 2,995 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 2392
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
4854
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: ...
4
2438
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...
5
14828
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
4796
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...
20
5133
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...
4
3507
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...
0
3034
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...
1
4500
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...
2
2461
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...
0
7783
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. ...
0
8023
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...
1
7547
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...
0
6129
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...
1
5426
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3548
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...
0
3536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2009
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1117
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.