Home
dBworxPE Online Help Prev Page Prev Page
dBworxPE Help File
Overview
Features
Register
Paging
Design
Basics
Field Types
Special Field Types
External Fields
Graphics Fields
Formula Fields
Lookup Fields
Relational Fields
Examples
Operation
Navigation
Add/Edit/Delete Records
Webforms
Smart Forms
Searching
Sorting
Filtering
Action Menu
Saving
Backup/Restore
Keyboard Reference
Text/HTML Editor
Listings, Reports and Labels
Listings
Labels
Reports/Documents
Print/View Document
Print/View Report
Pie Charts
Import
Export
XML import/export
PDA import/export
Macros
Programming
Create web page
Connect to Database
Viewer
Templates
Entry Templates
Application Templates
Tools
Network/Multi-user
FAQ
Other Plworx products
License
Contact
SMART FORMS:


 dBworxPE offers you the option to add, delete and
 edit records using a "Smart Form".  Smart forms
 are actually programs (written in JustBASIC) that
 allow the user greater flexibility to do custom
 processing during record entry and editing.  To
 create a "smart form" you must have downloaded
and installed JustBASIC (www.justbasic.com) -- once you've done 
that you can start the JustBASIC IDE from the "Macros/Programs"
menu in dBworxPE (or use it directly from JustBASIC) and key in 
your program.

A sample "smart form" is included with dBworxPE in the "justbasic"
subdirectory under your main dBworxPE directory.  The sample is 
named "frmsales.bas" and works with the "sales" sample database.
The program code in frmsales.bas can be viewed using the Editor
in dBworxPE (or any standard text editor), but to use frmsales.bas
you need to install JustBASIC, copy frmsales.bas (and frmsales.tkn)
to the directory where you installed JustBASIC, then start dBworxPE,
go to the "Macros/Programs" menu and set the path to the JustBASIC
directory.

NOTE: If you decide to try creating your own "smart form" program,
      you need to study the code in "frmsales.bas" and read the
      comments in that program.  There are some sections of code
      in "frmsales.bas" that should be copied "as is" into any 
      smart form programs you write - in particular, the code 
      that passes data to a "smart form" and the code that passes
      data back to dBworxPE.

Anytime you click on the "Smart Form" button on the main screen, 
dBworxPE will look to see if you've set a path to JustBASIC (if you
haven't dBworxPE will ask you to do so).  If dBworxPE can find the 
path to JustBASIC it will look in the JustBASIC directory for the
appropriate program file (the program name must be the prefix "frm" 
plus the dBworxPE database name plus a ".tkn" extension).  

The source code for a JustBASIC program is stored in a file that 
ends in a ".bas" extension, but to run that program from dBworxPE 
you have to create a "tokenized" file, which has the same name as 
the source program but ends in ".tkn".  You create a tokenized 
version of your source program by loading it in the JustBASIC IDE, 
clicking on the "Run" menu and selecting "Make *.TKN file". Once 
you've done that (keeping the tokenized file in the main JustBASIC
directory), then anytime you click on the "Smart Form" button 
dBworxPE will automatically try to locate that file, start it 
running, pass the current record to it, and wait for the JustBASIC 
program to end and pass the updated record data back to dBworxPE. 


Browser Based Help. Published by chm2web software.