473,406 Members | 2,849 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,406 software developers and data experts.

Using a combo box to change dates

15
edit - right scrap all that crap and letz start again. Its probz gonna be to diffcult to do dates problem so letz give this a try

I got a combo box that letz me select the course i am studying.

(Theology in film, Mythology and Judiasm)

Underneath that i got the time scales for each one like thiz

Theology in film

Date coursework given
Date 1st draft in
Date 1dt draft feedback received
etc

Mythology
Date coursework fiven
Date 1st draft in
Date 1st draft feeback received
etc

Now the way i has my form is that each section eg all the dates for myth are grouped together and the group is invizivle when the form first opens.

What i wantz you guys helps with is getting my form to make visible the group based on what i entered in the combo box.

Like if i entered Theology in film in the combo box, all the fields that are grouped together relating to theology in film will appear. but if i entered mythology then the fields for that would crop up instead

Respect experts
Sep 27 '10 #1

✓ answered by MMcCarthy

You speak of the field groupings by which I think you mean groupings of controls on a form.

You cannot refer to a group programmatically. However, you can refer to each control. So for example, if I have a combo box "combobox1" and two text boxes "txtbox1" and txtbox2 I could do the following in the After Update event of the combo box.

Expand|Select|Wrap|Line Numbers
  1. Private Sub combobox1_AfterUpdate()
  2.  
  3.     SELECT CASE Me!combobox1
  4.  
  5.     Case "Value1"
  6.         Me!txtbox1.Visible = True
  7.         Me!txtbox2.Visible = False
  8.  
  9.     Case "Value2"
  10.         Me!txtbox1.Visible = False
  11.         Me!txtbox2.Visible = True
  12.  
  13.     End Select
  14.  
  15. End Sub
  16.  
So what this does is if the user selects "Value1" in the combobox it makes txtbox1 visible and txtbox2 invisible. If the user selects "Value2" it does the reverse.

5 1619
slenish
283 100+
Check out this link and see if it does not help you

take care

http://www.databasedev.co.uk/filter_combo_boxes.html
Sep 27 '10 #2
JDDDDD
15
sorry dude but i dont getz it. that coding makes no sense to me. and besides i dont want a combo box to disable another combo box. i want it to disable a large number of fields and a few check boxes

plz help dude
Sep 28 '10 #3
MMcCarthy
14,534 Expert Mod 8TB
You speak of the field groupings by which I think you mean groupings of controls on a form.

You cannot refer to a group programmatically. However, you can refer to each control. So for example, if I have a combo box "combobox1" and two text boxes "txtbox1" and txtbox2 I could do the following in the After Update event of the combo box.

Expand|Select|Wrap|Line Numbers
  1. Private Sub combobox1_AfterUpdate()
  2.  
  3.     SELECT CASE Me!combobox1
  4.  
  5.     Case "Value1"
  6.         Me!txtbox1.Visible = True
  7.         Me!txtbox2.Visible = False
  8.  
  9.     Case "Value2"
  10.         Me!txtbox1.Visible = False
  11.         Me!txtbox2.Visible = True
  12.  
  13.     End Select
  14.  
  15. End Sub
  16.  
So what this does is if the user selects "Value1" in the combobox it makes txtbox1 visible and txtbox2 invisible. If the user selects "Value2" it does the reverse.
Sep 28 '10 #4
JDDDDD
15
ok sweet guy you rulez. using that coding i can do what i wantz perfecto now. cheerz

okz one last final problemo thatz i need solving. i figured out how to have its update when i open a form by attaching it to the on open thing for de form but when i switch between records it dont change.

I select Myth on record one and its all well and good but when i switch to record 2 it still set up for myth. and when i change the combo box to theology in film it updates all well and dandy but going back to record 1 its changed to represent theo in film instead of myth

Any helpz is all good ya know.

Respect
Sep 28 '10 #5
MMcCarthy
14,534 Expert Mod 8TB
Post your actual code, it's the only way I will be able to tell what is happening.
Sep 28 '10 #6

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

Similar topics

1
by: Cillies | last post by:
Hi! I have a form that displays information using DLookUp. Now at present I am going into the query and entering criteria that I want the form to display. i.e. the form is for a sports team and...
1
by: Cillies | last post by:
Does any one know if it is possible to search a database by using combo boxes from a form. I have a form which includes comboboxes. I want to know If I can use these combo boxes to search, i.e....
3
by: fstenoughsnoopy | last post by:
Ok the complete story. I have a Contact Table, Query and Form, that are used to input and store the contact info for customers. They have FirstName, LastName and Address as the primary key...
3
by: David | last post by:
Hi, I have a code for filling a dropdown, but I cannot work out how to make it fill with every date, including todays date, as required below i.e. 05/10/2006 06/10/2006 07/10/2006...
2
by: kathat | last post by:
I have a form with a combo box that I want to use for navigating through the records. I have 10 records (for test purposes) in my table (mainly text boxes, but also a check box and an ole object for...
1
by: Iyhamid | last post by:
Hi Every: Me Again.. still not finsh from same Project.. now I am in my last Problem.. I think anyway.. What I am trying to do is to get records between 2 dates in a combo box.. combo0 and...
2
by: cmartin1986 | last post by:
First of all I want to thank all of you that have helped me in the past this is an awesome fourm. My problem today is I have a database that builds charts that are viewed by a large group every...
1
by: jyotig | last post by:
hi, i am using combo box for company list in ms-access but if new company name will come that time i am going to table and add new company and again open form and select that company. there is...
2
by: ganesandeiav | last post by:
Dear sir how to retrieve a data that has been selected using combo box using jsp
2
by: franc sutherland | last post by:
Hello, I am using Access 2003. I have a query which shows a list of club meetings sorted by date. This query is displayed in continuous forms, in a subform. I would like to select a month on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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,...
0
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...
0
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...
0
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,...
0
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...

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.