WinHelp Database Publishing with MiniHelp Plus
A Tutorial by John C. Reynolds III
This is Part 5 of 6 (Write to Text Source File)

Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6

TASK 4: Write from the Database to the Text Source File

Finally we are ready to have the database write our source file. Our source (.src) file is an ASCII text file that will be used by MiniHelp Plus to compile the WinHelp .rtf topics file and, ultimately the WinHelp (.hlp) file itself.

The example Access Basic code for this is in Function rptPbookWhelp().

rptPbookWhelp()

There are several items in this procedure that should be explained:

See also:

Two Source Files are Made in the Example

Recall that my example WinHelp Daniel phone book is derived from two source files, depersn1.src and depersn2.src. So, halfway through the function rptPbookWhelp(), look for the statement "Close FN". This is where I've finished writing the first source file, depersn1.src, and I'm ready to begin writing the second source file, depersn2.src.

After I close depersn1.src, I redefine the variable Filename with the new filename, depersn2.src, let the Access function FreeFile give me a new file number ("FN = FreeFile"), return to the top of the open recordset ("PbookSet.MoveFirst"), and issue the command "Open Filename For Output As FN". Afterwards, I can begin writing lines to the newly opened source file.

[<<] PREV | NEXT [>>]
This is Part 5 of 6 (Write to Text Source File)

Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6

©1997 John C. Reynolds III - last updated 1997 November 20
http://www.compassnet.com/jreynold/whdb_4.htm
is a registered trademark for Daniel Industries, Inc.