Hello All:
I need to have a list box appear, user selects a service type (i.e. G, GR, 2D, etc...). I have a table called 'Custcode.dbf' that has the service types entered in a field called 'code'. I need to pull all from custcode.code and when the user double-clicks their service type, it will be inserted into the Logdetl.logacttv (logacttv is where I need the service type code inserted).
Using VFP 5.0 in a Windows 2000 enviroment.
Thank you all & Happy Holidays,
~PM
&&MyCode
Procedure ServiceType()
back_to=SELECT() && curretn work area
oForm = createobject('ServiceType')
oForm.Show
Define class ServiceType as Form
DataSession = 2 && Private data session
Caption='Select custcode' && This is where you list their && service type, utilizing it like a temp table(prevent
&& table lock).
ControlBox= .f. && We don't want ,min,max etc buttons
BorderStyle=1
Height=300
Width=200
*Autocenter=.T.
WindowType=1 && Modal - we don't want user to go on into this
Add object ServiceType as listbox with ;
Left=0, Top=0,Height=300,Width=200
Procedure ServiceType.Init
list.value=lstCode.code
USE Custcode in 0 again alias mcode
With this
.RowSourceType = 3 && SQL
.RowSource = 'select logacttv from mcode into cursor lstCode'
.Columncount=1
Endwith
Endproc
Procedure ServiceType.dblclick
insert into LOGDETL (Logacttv) values (this.value)
select mLogdetl
USE
IF USED(back_to) && do we have some where to go back to
SELECT (back_to)
ENDIF
Thisform.release()
Endproc
Enddefine
I need to have a list box appear, user selects a service type (i.e. G, GR, 2D, etc...). I have a table called 'Custcode.dbf' that has the service types entered in a field called 'code'. I need to pull all from custcode.code and when the user double-clicks their service type, it will be inserted into the Logdetl.logacttv (logacttv is where I need the service type code inserted).
Using VFP 5.0 in a Windows 2000 enviroment.
Thank you all & Happy Holidays,
~PM
&&MyCode
Procedure ServiceType()
back_to=SELECT() && curretn work area
oForm = createobject('ServiceType')
oForm.Show
Define class ServiceType as Form
DataSession = 2 && Private data session
Caption='Select custcode' && This is where you list their && service type, utilizing it like a temp table(prevent
&& table lock).
ControlBox= .f. && We don't want ,min,max etc buttons
BorderStyle=1
Height=300
Width=200
*Autocenter=.T.
WindowType=1 && Modal - we don't want user to go on into this
Add object ServiceType as listbox with ;
Left=0, Top=0,Height=300,Width=200
Procedure ServiceType.Init
list.value=lstCode.code
USE Custcode in 0 again alias mcode
With this
.RowSourceType = 3 && SQL
.RowSource = 'select logacttv from mcode into cursor lstCode'
.Columncount=1
Endwith
Endproc
Procedure ServiceType.dblclick
insert into LOGDETL (Logacttv) values (this.value)
select mLogdetl
USE
IF USED(back_to) && do we have some where to go back to
SELECT (back_to)
ENDIF
Thisform.release()
Endproc
Enddefine