Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2009
    Location
    Gatineau, Quebec Canada
    Posts
    147
    Provided Answers: 1

    Unanswered: Dynamically Setting Form Control Sources

    I am keeping student records for my classes in Nanning, China. Yep, teaching English. For each student, I need to record marks and absences for 20 weeks ( for a total of 40 data fields). The basic table design is ugly (I simply use one record with 50 fields per student), but such is life.

    What I want to do is to select through a combo box a period (such as week 6, and call a continuous form having student name, student number, a week 6 mark textbox and a week 6 absence textbox so that I can input data for that week. Easily done -- with 20 forms -- which I would like to avoid.

    Is there any way to dynamically set the control source of the text boxes in a single form (i.e from a combo box in the proceeding forum which calls it)?

    John S

    Xinjian College
    Guangxi University
    Nanning (still really hot)
    China

  2. #2
    Join Date
    Mar 2009
    Location
    Gatineau, Quebec Canada
    Posts
    147
    Provided Answers: 1
    If PKStormy is correct, I should be able to set controlsource for the two text boxes on a form initialize (or other startup) event. At the same time, I can also vary by labels. Sound workable?

  3. #3
    Join Date
    Mar 2009
    Location
    Gatineau, Quebec Canada
    Posts
    147
    Provided Answers: 1
    "my labels"

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Yes!

    OnOpen you can Me.ControlName.ControlSource = <whatever> and Me.LabelName.Caption = "Whatever ya want".
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •