Welcome! Log In Create A New Profile

Advanced

How to do a lookup

Posted by PETER ZHOU 
PETER ZHOU
How to do a lookup
November 09, 2008 10:46AM
Hi,

First time i'm using a combo box to do a lookup - "Expanded Type - popup window"

My question is how do i "bring back" the value selected by the user in the "popup window" to the combo box?

for example
under COMBO_CUSTOMERCODE, when lookup to the popup of TABLE_CUSTOMER
enduser highlighted a customer record "ABC" & double-clicked
popwindow closed and show COMBO-CUSTOMERCODE the value "ABC" ?

Regards,

PETER ZHOU

Jimbo
Re: How to do a lookup
November 09, 2008 12:07PM
Hi Peter,

I'm giving you just a fast example, if questions arise, please feel free ... I assume that you have a button right or left to the combo that will open the vision+ window? Code in button:

// open the vision+ window
IF Open(Vision_MWSTSATZ_Fiche,(iMwStNum)) THEN
	// the window was modified
	MyWindow..Modified = True
	ReturnToCapture(Fiche.iMwStNum)
END

In the vision+ window (I'm using MDI, which makes things a bit different to SDI) the OK-button contains the following code:

// Stop the automatic window refesh
SuspendRefresh(True)									

ErgebnisString = PreviousWin()
{ErgebnisString+".Fiche.iMwStNum"} = MWSTSATZ.iMwStNum

// Set the window return value to 'True'
MyWindow..ReturnedValue=True

// close the window
Close()

Kind regards,
Guenter
PETER ZHOU
Re: How to do a lookup
November 10, 2008 10:16AM
Quote
Jimbo
Hi Peter,

I'm giving you just a fast example, if questions arise, please feel free ... I assume that you have a button right or left to the combo that will open the vision+ window? Code in button:

// open the vision+ window
IF Open(Vision_MWSTSATZ_Fiche,(iMwStNum)) THEN
	// the window was modified
	MyWindow..Modified = True
	ReturnToCapture(Fiche.iMwStNum)
END

In the vision+ window (I'm using MDI, which makes things a bit different to SDI) the OK-button contains the following code:

// Stop the automatic window refesh
SuspendRefresh(True)									

ErgebnisString = PreviousWin()
{ErgebnisString+".Fiche.iMwStNum"} = MWSTSATZ.iMwStNum

// Set the window return value to 'True'
MyWindow..ReturnedValue=True

// close the window
Close()

Kind regards,
Guenter

Hi Guenter,

Thank you for your reply.

I'm not using a button to open any window.

I would like to know whether i can use the combo box to do a lookup - "Expanded Type - popup window and "bring back" the values selected by the enduser?

Regards,

PETER ZHOU
PETER ZHOU
Re: How to do a lookup
November 11, 2008 06:01AM
Quote
PETER ZHOU
Quote
Jimbo
Hi Peter,

I'm giving you just a fast example, if questions arise, please feel free ... I assume that you have a button right or left to the combo that will open the vision+ window? Code in button:

// open the vision+ window
IF Open(Vision_MWSTSATZ_Fiche,(iMwStNum)) THEN
	// the window was modified
	MyWindow..Modified = True
	ReturnToCapture(Fiche.iMwStNum)
END

In the vision+ window (I'm using MDI, which makes things a bit different to SDI) the OK-button contains the following code:

// Stop the automatic window refesh
SuspendRefresh(True)									

ErgebnisString = PreviousWin()
{ErgebnisString+".Fiche.iMwStNum"} = MWSTSATZ.iMwStNum

// Set the window return value to 'True'
MyWindow..ReturnedValue=True

// close the window
Close()

Kind regards,
Guenter

Hi Guenter,

Thank you for your reply.

I'm not using a button to open any window.

I would like to know whether i can use the combo box to do a lookup - "Expanded Type - popup window and "bring back" the values selected by the enduser?

Regards,

PETER ZHOU

Hi Guenter,

I've found a way to do it...Just call the popupwindow to the VISION_CUSTOMER window and "capture" the value selected by the user and equate it back to the COMBO box.

Regards,

PETER ZHOU
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: