Fragments are pieces of code that occur regularly in programs but which can't be encapsulated in procedures. The image shows a typical example of a fragment (Open Jet Database). It consists of a series of lines you use regularly in your code, but which you would normally not encapsulate in a procedure. Which fragments folders are visible in the tree depends on:
Start this dialog from Toolbar or using Alt-CN ( Code-vb - Fragment)
Coding using fragment builder consists of selecting the appropriate fragment and moving thru the open parameter positions using tab. At each positions a pop-up lets you select an appropriate action: insert an existing or new variable or expression. A selected variable will automatically replace all parameter positions with the same specification (see below). [Insert] adds the fragment to the current position in the code module. The cursor is automatically moved to the position in the fragment marked with . Jump to the next or previous position using TAB and SHIFT-TAB. When in the variable builder OK is pressed Fragment Builder uses defaults on not specified parameters when [Insert] is clicked . In the example it would automatically insert the cnn variable. A selected variable will automatically replace all parameter positions with the same specification Shortcuts If you want a node to appear at multiple nodes in the tree you can use shortcuts. This makes it easier to find the node you require. For example looping thru multiple files fragment you might look for either under the Files and Folders node and under Loops node. To create a shortcut: Select the item you want to have a shortcut from Right-click > Copy for Shortcut Select the folder you want to copy the shortcut to Right-click > Paste shortcut Note: you can also use Explorer to create shortcuts. Controls: New Create a new fragment. Edit Edit selected fragment. Delete Delete selected fragment Insert Inserts the fragment to the current position in the code module. The cursor is automatically moved to the position in the fragment marked with <cursor>. Uses defaults on not specified parameters. Cancel Closes the builder without adding the fragment Help Starts this Help topic
A selected variable will automatically replace all parameter positions with the same specification
If you want a node to appear at multiple nodes in the tree you can use shortcuts. This makes it easier to find the node you require. For example looping thru multiple files fragment you might look for either under the Files and Folders node and under Loops node.
To create a shortcut:
Note: you can also use Explorer to create shortcuts.
Create a new fragment.
Edit selected fragment.
Delete selected fragment
Inserts the fragment to the current position in the code module. The cursor is automatically moved to the position in the fragment marked with <cursor>. Uses defaults on not specified parameters.
Closes the builder without adding the fragment
Starts this Help topic