Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2004
    Posts
    57

    Unanswered: create text box from vba

    I am trying to build a form that will create a text box for a field for each record from a table within the db when the form opens.

    Any ideas? I really just want to know if you can add a text box from vba...

    example -
    table named cars

    a field named make

    make
    chevy
    ford
    toyota

    when the form was opened 3 text boxs would appear with one containing the text 'chevy', one containing the text 'ford', one containing the text 'toyota'

    thanks

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Have a look at continuous forms, perhaps?
    George
    Home | Blog

  3. #3
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151
    I'm not sure if you can create them on the fly. It would probably take a bit of code to get them in the correct position anyway. What you can do is have them already on the form and have them hidden. I'm not sure on what event you would use, but you can dynamically unhide them and also populate them with simple VBA code.

    Hope that helps! Stu
    --If its free, take it for what its worth!

  4. #4
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151

    New ECookie for George

    Enjoy! Sorry I don't have any milk for you.
    Attached Thumbnails Attached Thumbnails ECookie.jpg  
    --If its free, take it for what its worth!

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Yup, I think GeorgeV has nailed this one and fully deserves the cookie!
    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
  •