Difference between revisions of "Microsoft Access examples and tutorials"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(See also)
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
The list is not comprehensive -- I add links and examples as I need them.
 
The list is not comprehensive -- I add links and examples as I need them.
 +
 +
== Treeview and listview problems in Access 2013 ==
 +
 +
Steps:
 +
 +
<nowiki>Copied MsComCtl.ocx from my Windows 7 computer with Office 2010.
 +
 +
Placed in C:\Windows\SysWow64 folder, AND c:\Windows\System32 folder
 +
 +
Registered it.
 +
 +
Decompiled, and recompiled my Access application.
 +
 +
Deleted treeview control from form, and added a “new” treeview control.</nowiki>
 +
 +
Also:
 +
 +
<nowiki>Finding the MSComctlLib on a 64 Bit version of Windows and setting the reference with code.
 +
 +
What this code does is open the database check which version of Access computer is running (32 or 64 Bit), then checks what version of Windows (32 or 64 Bit) then removes the reference to the MSComctlLib (MSCOMCTL.OCX), then sets the reference to the MSComctlLib (MSCOMCTL.OCX) from the correct location.
 +
 +
Why would anyone need to do this is because the reference is located in different folders depending on which version of Windows the computer is running.
 +
 +
You need to check which version of Access so you use the proper code to call the API’s used.
 +
 +
This will eliminate errors on different computer configurations saving confusion and the need to fix the missing reference manually.
 +
 +
I have attached the code in a text document used to create a demo.</nowiki>
 +
 +
See:
 +
 +
* http://thesmileycoder.com/treeview-working-in-access2013/
 +
* http://www.utteraccess.com/forum/index.php?showtopic=2032428&pid=2564329&st=0&#entry2564329
  
 
== Database and recordset ==
 
== Database and recordset ==
Line 41: Line 74:
 
* [https://support.microsoft.com/en-us/kb/167309 Sample Procedure to Fill a TreeView Control Recursively] @ support.microsoft.com
 
* [https://support.microsoft.com/en-us/kb/167309 Sample Procedure to Fill a TreeView Control Recursively] @ support.microsoft.com
 
* [https://www.youtube.com/watch?v=M5KqFjhQqNg Treeview basics, loading information into the treeview] - TheSmileyCoder @ YouTube
 
* [https://www.youtube.com/watch?v=M5KqFjhQqNg Treeview basics, loading information into the treeview] - TheSmileyCoder @ YouTube
 +
* [https://msdn.microsoft.com/en-us/library/aa443386(v=vs.60).aspx Add Method (Nodes Collection)]
 +
** Adds a Node object to a Treeview control's Nodes collection.
 +
** Syntax: object.Add(relative, relationship, key, text, image, selectedimage)
  
 
See also:
 
See also:

Latest revision as of 06:36, 24 May 2016

This article lists examples and tutorials for Microsoft Access.

The list is not comprehensive -- I add links and examples as I need them.

Treeview and listview problems in Access 2013

Steps:

Copied MsComCtl.ocx from my Windows 7 computer with Office 2010.

Placed in C:\Windows\SysWow64 folder, AND c:\Windows\System32 folder

Registered it.

Decompiled, and recompiled my Access application.

Deleted treeview control from form, and added a “new” treeview control.

Also:

Finding the MSComctlLib on a 64 Bit version of Windows and setting the reference with code.

What this code does is open the database check which version of Access computer is running (32 or 64 Bit), then checks what version of Windows (32 or 64 Bit) then removes the reference to the MSComctlLib (MSCOMCTL.OCX), then sets the reference to the MSComctlLib (MSCOMCTL.OCX) from the correct location.

Why would anyone need to do this is because the reference is located in different folders depending on which version of Windows the computer is running.

You need to check which version of Access so you use the proper code to call the API’s used.

This will eliminate errors on different computer configurations saving confusion and the need to fix the missing reference manually.

I have attached the code in a text document used to create a demo.

See:

Database and recordset

Recordsets

Select records

Insert, Update, Delete records

Subqueries

Autonumber

Queries and filters

Form controls

TreeView

Use TreeView to display and manage hierarchal data.

See also:

Listbox

Use Listbox to display and manage lists data (non-hierarchal)

Subforms properties

Miscellaneous

Data types

Data Structures

Arrays

Strings

Utilities

See also