Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Still a problem - syntax error that occurs occassionally
Message
 
À
26/01/2001 13:32:53
Gene Maddox
Silver Creek Technologies
Johnson City, Tennessie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00469121
Message ID:
00469343
Vues:
10
Gene,
First I took the liberty of adding < pre > and < /pre > tags to your code so your indents show.

Second, I don't have an answer for your occasional syntax error, but have you considered not removing the record source of the listbox at all? Obviously if the code isn't there you won't get an error < grin >.

Unlike grids, there isn't any reason to 'blank' the RowSource or RowSourceType of a list when changing data, and you aren't even changing the data here. If you have a problem with the list not refreshing you could add
thisform.List1.Requery()
to the code.

HTH
Barbara

>here is what i have done up to this point.
>
>Rep is a table, not a cursor. It contains a program name (rep_prg_nm) that will run a report from a separate executable. The report name. And the title of the report (rep_ds). Basically, I have a form with a list box that is filled using the rep_ds field. The user selects a report from the list box and then clicks on a print button. Below is the code in the print button where the error occurs.
>I have taken out all commas, periods, quotes, slashes, dashes, etc. in the rep_ds field.
>if not empty(rep.rep_prg_nm)
>
>	ThisForm.LockScreen = .T.
>	ThisForm.List1.RowSourceType = 0
>	ThisForm.List1.RowSource = ''
>
>	cReportProcedure = alltrim(rep.rep_prg_nm)
>  * lcRep is a separate executable for running reports. All you do is send
>  * it the rep record and it will run the report, select the rep table and then
>  * return back to here.
>	lcDo = "do " + lcRep + " with 'arm', .T., .T., " + ;
>				alltrim(str(rep.rep_pk)) + ", '" +
>                                lcCompanyName + "', .F., .F., " + ;
>				lc2BillType
>	&lcDo
>
>	Select rep
>
>	ThisForm.List1.RowSourceType = 6
>  * the syntax error occurs on the following line, i cannot narrow it down to
>  * a specific report. a matter of fact, i can't reproduce the error on my
>  * machine, it just occurs every now and then.
>	ThisForm.List1.RowSource = 'Rep.rep_ds'
>	ThisForm.LockScreen = .F.
>
>else
>	MessageBox("There is no program associated with this report.", 0+48+0, ;
>				"No Report Program Defined")
>	return
>EndIf
>Any insight. Thanks for your help in advance.
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform