I tried the alias as follows but I keep getting file does not exist. What I have is two forms (form1 and form2). Form1 passes a parameter to form2 which contains the view name. The views are also parametized. so I do the following:
do form2 with hldid, lcdate, 'lv_offopt6'
when I go to form2 I have the following in the init:
parameter p1, p2
USE (p2) ALIAS tbl_view ORDER op_uniqueid
lcdate = (p1)
REQUERY(tbl_view)
seekval = INT(hldid)
SEEK(seekval)
.refresh()
When I run the code, it thinks that p2 is a dbf file when it is actually a view that I am trying open. It gives me the following error
File 'e:\budget2002\lv_offopt6.dbf' does not exist
I'm on the right track here, what is it that I am doing wrong? By the way I changed the controlsource for my textboxes to tbl_view.text1 etc... This should work right?
Thanks
Nick Patel
>>Is it possible to use setall command to set controlsource property of textboxes on screen? If so, how can I associated lets say a textbox controlsource property where the view is dyanamic. For example my textbox controsource property needs to be dynamic in that it can be lv_offdsp1.text1, lv_offdsp2.text1, or lv_offdsp3.text1. I need to use setall command with (view).text1
>>
>>Thanks
>>Nick Patel
>
>.SetAll() sets all controls to the
same value - the ControlSources have to be different.
>
>When I need something similar, I just open a table or view (the same form might open once with a table, once with a view) with an alias:
>
>
>use MyTable alias var_Table
>...
>* or:
>use MyView alias var_Table
>
>
>Otherwise, you could also centralize the ControlSource setting with OOP inheritance.
>
>HTH, Hilmar.