Wiki Home

QBF


Namespace: WIN_COM_API
http://www.classycomponents.com/Products/QBF/QBFBuilder.htm
If you want to play along, get and install the trial version from http://www.classycomponents.com/Products/QBF/QBFBuilder.htm

Note - it defaults to installing in "C:\Program Files\ClassyComponents\QBF", but it really isn't a program, it is a few vfp class libaries. So put them wherever you put 3rd party tools.
Part I - simple dbf based un-buffered form
http://dev.personnelware.com/carl/wnl/qbf/qbf1.zip
Part II - remote view based form.
Using the form built in Msde Vfp 101.

When you "ok" the QBF builder, it will do some amazing magic: it creates a new table on your server (so you had better give the current user admin rights) and modifies your view to join with that table.
Reviews:

August 1998 Fox Talk -- Craig Berntson

"Turn Data-Entry Forms into Query Forms, Easily", April 1999 FoxPro Advisor. -- Rick Schummer
Problems:

I - Query mode and Edit Box - user's input evaporates.
CREATE TABLE qt ( cFid1 c(10), cFid2 m )
INSERT INTO qt  ( cFid1, cFid2 ) VALUES ( "abc", "def" ) 


create form qt with 2 textbox's and 2 editbox's.
Text1.controlsource = "cFid1"
Edit1.controlsource = "cFid1"
Text2.controlsource = "cFid2"
Edit2.controlsource = "cFid2"

Drop the QBF button on the form, run the builder, add all 4 controls to the QBF list.

OK the builder, run the form, click QBF to go into query mode.
  1. Text1, enter "A", hit tab. - observed: "A" in the textbox, cursor moves to Edit1 - (good).
  2. Edit1, enter "B", hit tab. - observed: "B" in the Editbox, cursor moves to Text2 - (good).
  3. Text2, hit Ctrl-PgDn (how you edit text box's attached to a memo), enter "C". Observed: little black rectangle appears near cursor. Expected: "C" (bad?)
  4. Hit "D". Observed: Nothing. Expected: "D" (bad?)
  5. Hit Ctrl-Enter to save and close window.
  6. Hit Tab to go to Edit2.
  7. Edit2, enter "E" - observed: "E" in the Editbox - (good).
  8. Hit Tab - observed: "E" that was there disappears - (bad).
  9. focus should be on the QBF button, hit tab 3 times to get to Text2, hit Ctrl-PgDn - observed: "E" - expected "C" (weird.)

Temporary Solution

Here is a temporary work around for the memo problem until we can get an update out.

In the aftersetup method of the qbfbutton. Set the value of the editbox to ''. As in

Thisform.myeditbox.value = ''

This seems to solve the problem for memos attached to editboxes. The problem of attaching a memo to a text box is more of a problem and I do not have a quick fix for that one.

Please let me know if this works for you.
Jacob Bruner Classy Consulting
If you have the source code version of QBF here is the fix. An update will be on the web site late next week.

In the qbf.vcx cmdqbf go to the setupcontrols method.

Look for the following code.

** Initialize checkbox to NULL
**
IF UPPER(.BaseClass) = 'CHECKBOX'
.Value = NULL
This.aQBFControls[m.nIDX, HOLD_VALUE] = .Value
ENDIF


Add this code right after it.

** Initialize editbox to blank
IF UPPER(.BaseClass) = 'EDITBOX'
.Value = ''
This.aQBFControls[m.nIDX, HOLD_VALUE] = .Value
ENDIF

Jacob Bruner Classy Consulting

Contributors: Carl Karsten
Category Tools
( Topic last updated: 2001.10.03 05:18:04 PM )