# VBForums UtilityBank > UtilityBank - Tutorials >  [VB6] Jet SQL Help in the IDE

## dilettante

Here's a very quick tutorial on getting help with Jet SQL syntax from within the VB6 IDE.


*Some Background*

Note that this is limited to Jet 3.5 SQL syntax since that is the help file VB6 shipped with and has Help links to.  For information on Jet 4.0 SQL, ACE SQL, etc. you would have to install the appropriate version of MS Access to get those newer help files - but they can't be accessed this way from within VB6 as far as I know.

E.g. MS Access 2000, 2002, and 2003 come with JETSQL40.CHM, normally placed under a directory such as:

C:\Program Files\Common Files\microsoft shared\OFFICE11\1033

VB6 ships with and links to JETSQL35.HLP, normally placed under:

C:\Windows\Help

You may well be missing that VB6 help file if you skipped installing "database tools" when you installed VB6.  This seems to be a common mistake.


Before you can use any of the HLP files that shipped and install with VB6 you may have to deal with installing HLP support if you are running a modern version of Windows.  See:

Error opening Help in Windows-based programs: "Feature not included" or "Help not supported"

This has links to downloads of WinHelp32 installers for various versions of Windows.  Also note the section there: _How to enable macros on a single computer after you install WinHlp32.exe_, which tells how to get rid of an annoying dialog that can pop up.


*Once set up*

Once you have the necessary help environment things are easy.  Consider the following:



With the cursor over "SELECT" I press the F1 key and:



Oddly enough the _VBA SELECT_ topic is the VB6 Select keyword as in Select Case, while _VB Select_ here is the Jet SQL SELECT.  So now I select the VB help instead of the VBA topic and click the Help button:



Voila!

For whatever reason people seem to have forgotten about this assistance.  In any case a little preparation is required in order to make use of it on modern supported versions of Windows.


*Also*

I find it useful to create shortcuts to these help files, because sometimes I want to browse them for syntax details.  You can create chortcuts to the Jet 3.5 SQL help and if you have them the Jet 4.0 SQL, ACE 12.0 SQL, etc. help as well.

----------


## dilettante

*How it works*

VB6 contains dummy typelib information defining many Jet SQL keywords as empty procedures.  You can see those in the Object Browser if you enable hidden members:

----------


## dilettante

In case that MS KB article disappears or drops the info but you still have access to the WinHelp32 installer package I'll repeat part of it:

*How to enable macros on a single computer after you install WinHlp32.exe*

After you install the WinHelp32.exe program that is discussed in this article, certain macros are disabled. For more information about this issue, see the "Known issues" section. 

This section contains steps to re-enable these macros by modifying a registry key. If your computer is in a managed environment, do not follow these steps without first consulting with your IT department. IT departments may decide not to re-enable macros or they may decide to re-enable them by using group policies. IT departments should read this article in its entirety before you continue. 

Warning This article offers information about how to work around issues that are caused by changes in this release of Windows Help. However, Microsoft makes no specific recommendations about which registry keys and which values are right for your unique environment. If you are in a managed environment, your IT department is the best judge of how to weigh the advantages of these workarounds against the risks of using them. The safer course is to use no registry workarounds at all.

Note To perform the steps in this task, you must be logged on to the computer by using an administrator account. By using an administrator account, you can make changes to your computer that you cannot make with any other account, such as a standard account. 

To log on by using an administrator account, you must know the password for an administrator account on your computer. If you are performing these steps on your personal computer, you are likely already logged on by using an administrator account. If you are performing these steps on a computer at work, you might have to ask the system administrator for help. 

Manually enable macros on a single computer

Important Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur.

To enable macros on a single computer after you install WinHelp32.exe, follow these steps:

1. Log on by using an administrator account.

2. Press the Windows logo key + R, type regedit, and then click OK. If you are prompted for an administrator password or for confirmation, type the password, or click Continue.

3. On 32-bit editions of Windows, locate and then select the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft

On 64-bit editions of Windows, locate and then select the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft

4. On the Edit menu, point to New, and then click Key.

5. Type WinHelp, and then press Enter.

6. Click the WinHelp key.

7. On the Edit menu, point to New, and then click DWORD (32-bit) Value.

8. Type AllowProgrammaticMacros, and then press Enter.

9. On the Edit menu, click Modify.

10. In the Value data box, type 1, click Hexadecimal in the Base area, and then click OK.

11. Exit Registry Editor.

----------

