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
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.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL