TheLazyPig
Programmer
Hi!
How to declare parameters from form to prg file.
When I click OK button a prg file will execute the program.
The first dropdown contains the name of my prg file this will declare what prg file will run.
This is my code for OK button..
I put my parameters (month,year,foldir) in bfp_newprod.prg.
When I try to test my program I get an error of
And this line is the error
I used thisform to get the value of my parameters but it won't work because it's a prg file not form.
If I'll put my parameters to OK button, how will I use it to my prg file.
Thank you!
How to declare parameters from form to prg file.
When I click OK button a prg file will execute the program.
The first dropdown contains the name of my prg file this will declare what prg file will run.
This is my code for OK button..
Code:
SET CENTURY OFF
SET CENTURY ON
SET DELETED ON
SET SAFETY OFF
SET UDFPARMS TO REFERENCE
CLOSE ALL
CLEAR
LOCAL lcDir, accntGrp
*----------------------------------
lcDir = "C:\RECOMPUTE\RECOMPUTE2\"
*----------------------------------
DO util.prg
accntGrp = thisform.cboAccntGrp.Value
DO CASE
CASE accntGrp = 'DEPED'
DO (lcDir)+"code\deped_newprod.prg"
CASE accntGrp = 'CAFGU'
DO (lcDir)+"code\cafgu_newprod.prg"
CASE accntGrp = 'HANJIN'
DO (lcDir)+"code\hanjin_newprod.prg"
CASE accntGrp = 'BFP'
DO (lcDir)+"code\bfp_newprod.prg"
CASE accntGrp = 'PNP'
DO (lcDir)+"code\pnp_newprod.prg"
CASE accntGrp = 'PRIVATE'
DO (lcDir)+"code\private.prg"
CASE accntGrp = 'REGULAR'
DO (lcDir)+"code\regular.prg"
ENDCASE
I put my parameters (month,year,foldir) in bfp_newprod.prg.
When I try to test my program I get an error of
And this line is the error
Code:
lcMonth = ALLTRIM(THISFORM.cboMonth.VALUE)
I used thisform to get the value of my parameters but it won't work because it's a prg file not form.
If I'll put my parameters to OK button, how will I use it to my prg file.
Thank you!