473,769 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

change the form based on options button

23 New Member
Is there a way to change the appearance of my form based on which option button is selected? I am using a form to input data into a table of transactions. There are basically 3 types of transactions (the type of which I would specify with an options button) and, though they all share common fields, some entries do not require all of the fields to be populated. For these I'd like for some of the combo boxes (my form uses combo boxes exclusively for data input) to not be visible. Is this sort of thing feasible or would I be better off just using Tab Controls? (Though I don't really want to take that option). I am using Access 2003.
Oct 9 '07 #1
4 2491
nico5038
3,080 Recognized Expert Specialist
You can use the AfterUpdate event of the Frame holding the options to code a SELECT CASE like:
Expand|Select|Wrap|Line Numbers
  1. SELECT CASE fraOptions
  2. Case 1
  3.    Me.cmb1.visible = true
  4.    Me.cmb2.visible = false
  5. Case 2
  6.    Me.cmb1.visible = false
  7.    Me.cmb2.visible = true
  8. end select
  9.  
This will require all the fields to be set to true or false !

The tab control can be used and the buttons can be hidden.
Then the fields can be placed on three tabs and the correct tab can be activeted in the same AfterUpdate event by using the fraOptions value like:
Expand|Select|Wrap|Line Numbers
  1. Me.tabctl1.Pages(fraOptions).setfocus
  2.  
Getting the idea ?

Nic;o)
Oct 9 '07 #2
seangibson
23 New Member
I'll have a look. Thanks. As a beginner, though, it may be a bit over my head.
Oct 10 '07 #3
nico5038
3,080 Recognized Expert Specialist
Then I would probably just use a tabcontrol and place the "specific" values per page.
The code I posted needs to be placed in events for the form. Looks "freightnin g", but is rather "easy".
To start you could define a new button with the button wizard, e.g. for opening another form, then you can inspect the created code by Access by clicking on the [...] button after the Procedure for the OnClick event in the properties window.

Nic;o)
Oct 10 '07 #4
NeoPa
32,573 Recognized Expert Moderator MVP
I'll have a look. Thanks. As a beginner, though, it may be a bit over my head.
Nico's first solution in post #2 (Select Case ...) should precisely meet your requirements. It looks complicated first time but give it a go. We can always help some more if you don't understand it all clearly first time through.
What it's basically doing is showing or hiding ALL of your variable fields (those which are sometimes shown but sometimes hidden) depending on the selection of your option buttons (The fraOptions control there is referring to the Frame that the radio buttons are in. It's value will always reflect which button is selected).
Oct 12 '07 #5

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

Similar topics

2
2688
by: Laurent Bertin | last post by:
Hi i got a strange problem but it's true i don't make thing like anyone... First Config: + IIS5.0 SP2 (yes i know...) WebSite Security Root : Digest Authentication, NT Authenticated SubFolders : Anonymous Login Anonymous login is set to use a domain user to enable a sql server authenticated connection. Permissions are based on Page/action/user Membership
2
4397
by: Galina | last post by:
Hello I have an application in MS Access 2000. I have a form, which includes a subform. The subform is based on a table, but locked for any editing. There is Edit button. When clicked, it starts a separate unbound form with all the fields, which are on the subform. The fields are filled in with data programmatically. User edits. Edited fields are copied into fields on the subform programmatically as well. I need to catch change in one of...
3
2902
by: RC | last post by:
I can't quite grasp the concept of creating custom reports depending upon what options a user picks on a Form. For example, the user clicks on a "Print Reports" button and a Form pops up. On the Form the user can choose to get a report that shows the Box Numbers that are at Warehouse A, Warehouse B or Warehouse C. and then click on the Print Preview button and get a report showing only the Box Numbers in whichever warehouse was...
1
1980
by: news.wanadoo.nl | last post by:
Hi, I have found whit google this form in this group. But i'n not good in javascript :(. I try and error normal but i only error now :P Whit i now want to now how can i get access to the vars vis and inv. Normal when i submit a form then is see something link formhandler?vis=somthing&inv=something. But i dont see that in this form. I want the use data form this form to set it in a databse whit php. I cant get use nog $_GET is wil give...
7
3821
by: Chuck Anderson | last post by:
I'm pretty much a JavaScript novice. I'm good at learning by example and changing those examples to suit my needs. That said .... ..... I have some select fields in a form I created for a database search that I am unable to figure out how to access. (The search is implemented in Php/MySQL.) The user enters search values for: name, address1, city, .... etc., ..... and for each of these they also select whether the search should...
11
2402
by: free4trample | last post by:
First of all let me say that I know very little about javascript. what i need to do is to write a javascript functin which will change the background color of the table rows based on entrees in the table. See an example of the webpage that the script will work with here: http://igorpetrusky.awardspace.com/RunStats.html now, at the top there will be 3 buttons, which will call javascript functions that will operate on tables 2 through N. ...
6
19147
by: Arthur | last post by:
Hello. How might it be possible to change where a form action is directed based on a selected option. For example I have this: <FORM METHOD = "post" ACTION = ""> And a drop down such as
3
1207
by: uniqueabc | last post by:
hi all, I have to develope a form which has mutiple choice (radio buttons) on the top and based on the button selected the entries for the form changes dynamicallyat the bottom. can anybody plz help me with this I developed a JSP code like this for all the radio button options!!! but this is not functioning. the paramnames change accordingly ************* if (document.MailForm.requestType.value == "Modify User") {...
0
3395
bmallett
by: bmallett | last post by:
First off, i would like to thank everyone for any and all help with this. That being said, I am having a problem retrieving/posting my dynamic form data. I have a form that has multiple options within options. I have everything being dynamically named from the previously dynamically named element. (I hope this makes sense.) I am not able to retrieve any of the dynamically created values. I can view them on the source page but can't pull them...
0
10211
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
10045
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...
0
9863
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7408
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
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...
1
3958
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
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.