You didn't say what "a button" is. If you mean a button on a form, there are two easy ways:
Set the Hyperlink Address property of the button to the name of the CHM file. Unfortunately, this prompts the user to approve opening the file.
Or, to avoid the user being prompted...
Write this code in the Click event for the button.
Dim x As Long
x = Shell("hh.exe your_help_file_spec")
If your_help_file_spec has spaces in it, use this syntax...
x = Shell("hh.exe ""your help file spec""")
If you mean a button the the keyboard (in particular F1) to open the file, set the Help File property of the form to the name of your help file. Set the Help Context ID property to a number that will display the main help page. If you have specific help context for each field, you can set the Help Context ID for each field. Then F1 will open to the specific help.
Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org