Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling Modal Child Dialog
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
CodeMine
Title:
Calling Modal Child Dialog
Miscellaneous
Thread ID:
00657702
Message ID:
00657702
Views:
82
I would appreciate a little help on this one, as I am a little stumped. It's probably so simple I am making it hard.

I need to know how to do this using CodeMine 7 (and I have only been using CodeMine for a couple months).

The problem is this: I have a Main Form that receives address information. In the DataEnvironment of this form, I have two non-linked tables titled orders.dbf and zip.dbf. The zip.dbf has only three fields (zip, state, city), and is NOT related to the main orders.dbf table.

When entering in the Main Form new address info, when the user enters a Zip and presses tab, I hit the zip.dbf table with a seek and automatically fill in the city and state. This part is working perfectly, if the zip is found.

However, if the zip is not found, I am bringing up a Modal Form based on CodeMine FrmModalDataChildCustom. The iReleaseOnClose() = .T., and the uValue = .T. for this form. The only thing on this form is OK/Cancel along with a Zip, City, and State field for the user to enter the new Zip/City/State that was not found in the zip.dbf. I will then save this new info into the zip.dbf.

When this Modal Form comes up, the zip/state/city fields are all three grayed out and will not allow data to be entered into them. And THIS is the problem, I can't enter any data into them. To test the Modal Form, if I place a field like LastName from the Main Form - it is editable.

The code to call this is found in the DataManager of the Mainform in the FieldValid(). I put it here instead of in the FieldValid() method found in the CMRuleCustom as it is calling a form. The code is as follows - found in the FieldValid() of the DataManger, and I have commented the problem line:
LPARAMETERS cWorkarea, cField, uValue

IF LOWER(m.cWorkarea) == 'orders'
    DO CASE
       * Zip is checked with the zip.dbf to store the city/state to the Form.
       * If not found, a form is called to allow the City/State/Zip 
       * to be entered into the zip.dbf file. The form name is ZipLook.scx.
    CASE LOWER(m.cField) == 'zip'
        IF SEEK(m.uValue, 'zip', 'zip')
            m.uValue = zip.zip
        ELSE
* PROBLEM CODE STARTS HERE
            DO FORM ZipLook1 TO lStatus
* PROBLEM CODE ENDS HERE
            IF m.lStatus
                m.uValue = zip.zip
            ELSE
                RETURN .F.
            ENDIF
        ENDIF
    ENDCASE
ENDIF
RETURN .T.
Any help would be appreciated.

Also, since I am using iReleaseOnClose = .T., I need to manually close this form. Where and how do I do that?

Thanks for any help.

Mel Cummings
Next
Reply
Map
View

Click here to load this message in the networking platform