Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with active form.
Message
From
05/04/2000 05:33:20
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00355559
Message ID:
00355562
Views:
29
Hi Robin.

>> When a user adds a new item to a combobox, I want to call another form, allow the user to add the new details on the new form & save them. <<

The easiest way to determine whether the user added a new item to the combo, is in the combo's Valid like so:
WITH This
   IF .ListIndex = 0 AND !EMPTY( .DisplayValue )
      *** Enter data in the called form and return the new value for the combo box
      DO FORM MyOthetForm TO luComboBoxValue
      .Requery()
      .Value = luComboBoxValue
ENDIF
You want to make sure that MyOtherForm has its WindowType set to 1-Modal and that it is using the default data session. That way, if the calling form is using a private data session, the called form can "share" its data.

>> I then want to return to the original form, and continue to the the next field on my form. <<

This is the problem. You cannot issue a SetFocus() from the Valid() of a control. However, when you release the modal form, focus will return to the combo box. Isn't this good enough?

Marcia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform