Using a combo box to change dates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JDDDDD
    New Member
    • Sep 2010
    • 15

    Using a combo box to change dates

    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
  • slenish
    Contributor
    • Feb 2010
    • 283

    #2
    Check out this link and see if it does not help you

    take care

    Comment

    • JDDDDD
      New Member
      • Sep 2010
      • 15

      #3
      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

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

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

        You cannot refer to a group programmaticall y. 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.

        Code:
        Private Sub combobox1_AfterUpdate()
        
            SELECT CASE Me!combobox1
            
            Case "Value1"
                Me!txtbox1.Visible = True
                Me!txtbox2.Visible = False
        
            Case "Value2"
                Me!txtbox1.Visible = False
                Me!txtbox2.Visible = True
            
            End Select
        
        End Sub
        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.

        Comment

        • JDDDDD
          New Member
          • Sep 2010
          • 15

          #5
          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

          Comment

          • MMcCarthy
            Recognized Expert MVP
            • Aug 2006
            • 14387

            #6
            Post your actual code, it's the only way I will be able to tell what is happening.

            Comment

            Working...