Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Entry Popup on a form

Status
Not open for further replies.

Mrall

Programmer
Nov 22, 2008
64
US
I have a form that has a numeric keypad on it. It is used to fill in a field on that form. When a certain button is clicked on I want to popup a window asking for other information, which is entered by the numeric keypad on the orginal form. (I'm using a touchscreen monitor with no keyboard or mouse) I tried to use another form for the popup but it just does not work.
I setup a logical on each of the numerics on the keypad to test where to place the digit (either the normal place or the popup) Im not sure how to proceed

I'm sure there is a programic way to popup a window with a data field and accept input from the keypad on the orginal form calling it. The thisform.refresh function must work for the popup. I'm not sure how.

Thanks for any help
 
You could have a few small problems. If the popup form is modal, the keypad of the original form will never work, so the popup form can't be modal.

If you use the keypad the keypad form get's focus. That is a smaller problem, but it might come to front and overlap with the popup form. Plus you can't really use _screen.activeform as an alternative to thisform, if you want to adress the popoup form.

What you need to refresh the popoup form is a reference to it. Thisform will always be this form, there is no way setting it to be another form, to adress other forms you need a reference to another form.

The simples way to adress another form is to create it and store a reference to this form, eg like this:

Code:
Local loPopupform

* only use one of the alternatives 1 or 2
* comment out the other one

* alternative1: a form class:
loPopupform = CreateObject("popupformclass")
loPopupform.Show()
* alternative2: an scx form:
Do Form popupformform WITH.... NAME loPopupform

* following code works in general again:
* store a refenece to later act on that form
Thisform.oPopupform = loPopupform 

*in the click event of the buttons:
thisform.oPopupform.control.value = ...
thisform.oPopupform.refresh()

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top