>Someone please help! I created a list box on my form using the listbox builder. It is based on the clients table.
>
>Bound column = 1
>Bound to = .F.
>Number of Elements = 0
>Rowsource = clients.clientcode, clientname, tabledir
>rowsourcetype = 6 - fields
>
>It fills the listbox just fine. When I go to use the data selected by the user, it's a mess.
>
>I have the user select a client in the list box (or multiple clients) and then hit a command button to process the data based on clients selected.
>
>The button has one command: Do RunRpt. The first line of code in the runrpt program says ListCnt = 0. This is supposed to be used as a counter to loop through the listbox items. As soon as the program hits this line, I get "Cannot Access Selected Table." If I go into the debugger at this time and look at Thisform.listclients.list(anynumber) it is blank. It seems to lose all knowledge of ever being filled.
>
>I'm going crazy. Of course I needed to have this done yesterday. Any help would be greatly appreciated.
>
>Thanks.
>
Hi Jill,
It looks as if you're calling a program external to the form. If so, you can't reference "ThisForm" within it. Pass either the form (DO RunRpt WITH ThisForm), or better, the list (DO RunRpt WITH ThisForm.MyList), and change the program's interals accordingly.
George
Ubi caritas et amor, deus ibi est