dynamic visual basic form based on access database table

pts.
Tags:
Access
Database
DB2
Development
Oracle
VBA
Visual Basic
I am useing an access database table to populate some lists. I want to dynamicly add picture boxes that I use to seperate the list box as if lined based on how many records I have in the database. Basicly, I just need to know how to add a control by code. I don't want to have to place 100 picture boxes when I won't use but 20, but may in the future of the program when there are more entries in the populate database and may need 100. Thanks in advance.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Have you looked at the listview control. it has many different styles that probably would fit the bill. it certainly would make programming it a lot easier.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • PasztorZ
    You can use a controll array (in VB6). Insert a PictureBox somewhere on your form, make it invisible, and set its Index property to 0. Use the Load method with the next unused index to create a new instance, move it where you need and make it visible. Btw. for using as separator a Label can do just as well, and it uses much less resources.
    0 pointsBadges:
    report
  • PasztorZ
    Correction to the previous posting: a Label control cannot be shown on top of a listbox, but a TextBox can ... BR -- PZ
    0 pointsBadges:
    report
  • YitoGraft
    [...] Address: http://itknowledgeexchange.techtarget.com/itanswers/dynamic-visual-basic-form-based-on-access-databa... (0) Comments Read [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following