Runtime Controls in Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • keyur1719
    New Member
    • Nov 2007
    • 10

    Runtime Controls in Access

    Hi,

    I am new to Access,

    I have a form which contains 2 text boxes. I want to generate more text boxes, in runtime, based on the number of records in my recordset.

    I know how to do this in VB but that code dont work in Access,

    Can anybody help me in this. its urgent so prompt reply will be highly appreciated.

    Thanks

    Keyur
  • Minion
    Recognized Expert New Member
    • Dec 2007
    • 108

    #2
    Originally posted by keyur1719
    Hi,

    I am new to Access,

    I have a form which contains 2 text boxes. I want to generate more text boxes, in runtime, based on the number of records in my recordset.

    I know how to do this in VB but that code dont work in Access,

    Can anybody help me in this. its urgent so prompt reply will be highly appreciated.

    Thanks

    Keyur

    Keyur,

    Why exactly do you need to produce more text boxes at runtime? From the sounds of it you need to display the information in multiple records on one form as more records are added. If this is the case then you might looking at creating a Continuous Form that will show multiple records on the same form.

    If this sounds more like what you need I would do a search on Continuous Forms in help, on this board, or google as there are tons of information out there. However, if you truely need to dynamically create the form at runtime I'm sure one of the helpful individuals present will be able to assist you in generating the necessary code.

    Hope this helps.

    - Minion -

    Comment

    • keyur1719
      New Member
      • Nov 2007
      • 10

      #3
      Originally posted by Minion
      Keyur,

      Why exactly do you need to produce more text boxes at runtime? From the sounds of it you need to display the information in multiple records on one form as more records are added. If this is the case then you might looking at creating a Continuous Form that will show multiple records on the same form.

      If this sounds more like what you need I would do a search on Continuous Forms in help, on this board, or google as there are tons of information out there. However, if you truely need to dynamically create the form at runtime I'm sure one of the helpful individuals present will be able to assist you in generating the necessary code.

      Hope this helps.

      - Minion -

      Hi Minion

      Thanks for your reply..

      Here is what exactly I am looking for..

      I want to create a form which will show the names of all the employees on the form, based on the number of records in the recordset. Along with this I also need to show a text box for each employee, beside his/her name on the form for putting in some information about that employee. Now if i create a contineus form, it will automatically generate the bonded control, but the text box that I want to put beside employee name is not bounded.

      I changed the form property to Continuous form and its generating the controls automatically. However, there is another problem in this way. When I entere data in unbounded text box, it takes same value in all the instances of that unbounded textbox. How to solve this problem? and how can I store values entered in each instances of the unbounded text box in the database?

      Thanks...

      Keyur

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        If you want information for a given employee to be part of his/her record then the textbox has to be bound to your underlying recordset! How else would you expect Access to keep track of which comments go with which employees? For data to be stored it has to be bound to a table!

        Linq ;0)>

        Comment

        • Minion
          Recognized Expert New Member
          • Dec 2007
          • 108

          #5
          Originally posted by keyur1719
          Hi Minion

          Thanks for your reply..

          Here is what exactly I am looking for..

          I want to create a form which will show the names of all the employees on the form, based on the number of records in the recordset. Along with this I also need to show a text box for each employee, beside his/her name on the form for putting in some information about that employee. Now if i create a contineus form, it will automatically generate the bonded control, but the text box that I want to put beside employee name is not bounded.

          I changed the form property to Continuous form and its generating the controls automatically. However, there is another problem in this way. When I entere data in unbounded text box, it takes same value in all the instances of that unbounded textbox. How to solve this problem? and how can I store values entered in each instances of the unbounded text box in the database?

          Thanks...

          Keyur
          My apologies Keyur, but I still seem to be failing to understand why it is you need to have an unbound text box. Would it not just make more sense to create a new field in table and bind it to the new text box? Perhaps I'm not understanding where the text box is going to store its information, if at all.

          Ultimately I guess the problem is we're not understanding why the text box has to be unbound in the first place.

          - Minion -

          Comment

          Working...