Separate speaker notes to accompany Accesscode

Slide #1:

This presentation covers two basic programs that establish the access to the table in the Access database through code written by the developer/programmer.

Slide #2:

Microsoft ActiveX Data Objects 2.1 Library must be selected from the available references.

Slide #3:

This shows the form I set up. I have highlighted the text box to hold the student idno. Note that the DataSource etc. have not been set.

Slide #4:

When the program loads, this is the data that you see. This happens because the data is bound to the fields in the code.

Slide #5:

This slide shows the results of the Find By Name which found Mary Stanton.

Slide #6:

In this slide I have set up conStudent as ADODB.Connection and rsstudentrel00 as ADODB.Recordset. On the next slide, see the form load.

Slide #7:

"Assigns an object reference to a variable or property

Syntax:

Set objectvar = [New] objectexpression

New is usually used during declaration to enable implicit object creation. When New is used with Set, it creates a new instance of the class. If objectvar contains a reference to an object, that reference is released when the new one is assigned. The New keyword can't be used to create new instances of any intrinisic data type and can't be used to create dependent objects." From Microsoft VB 6.0 Help

Slide #8:

RIGHT JOIN allows records on the unmatched records in the second table.

Slide #9:

Note that the Set statement establishes that the data source is rsstudentrel00.

The assign statement then puts a field fro the recordset into the text field using data field.

Slide #10:

Depending on the option selected, I am setting up wkFind which I then use with the rsstudentrel00.Find.

Slide #11:

This shows the navigation that is accomplished through the menu.

Slide #12:

These are command navigation buttons. When clicked they perform the menu routines.

Slide #13:

This shows the output from PrStudentGridCode.vbp. Note that there is information from the student table and from the major table - the connection is on majorcode.

Slide #14:

Much of the code in this example is the same as the code in the previous example. The difference here is that I am establishing a grid for the data using a data grid.

Slide #15:

Note that Data Source is not set in the properties. I am setting it in the code on the previous page.

Also note that I am using a Data Grid.