Very Simple Question - I think


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Very Simple Question - I think

Hybrid View

  1. #1
    Andrew Murphy Guest

    Very Simple Question - I think


    Hi, I am an experienced VB coder and a member of my family wants me to create
    a macro in MSWord. Now I am not that confident with VBA because the syntax
    is slightly different so I have a very simple question. I have a list box;
    I want to fill the list box with all the records in the field "Name" in a
    database. When the list box is clicked I would like two textboxs (txtDOB
    and txtSchool) to be filled with the DOB and the School of the pupil, stored
    under fields of the same name. I have no idea how to start, I have drawn
    the form and have coded everything else I need, I only need this to make
    it work. This isnít a commercial thing, just a favour for family.

    Thanks in advance

    Andrew

  2. #2
    robert Guest

    Re: Very Simple Question - I think


    I am not a very experienced anything, however I beleive this is relevant.
    SlctLB = Selected ListBox item

    Text1 = TextBox1
    Text2 = TextBox2

    SQL = "SELECT FROM UserDataBase WHERE StudentName = SlctLB"

    This SQL statement would be passed to a DAO object to which Text1 and Text2
    two would be related. The textboxes would then be set to display the desired
    attributes from the record returned by the SQL querry. The DAO object is
    used to relate the database and the VB program.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center