Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: steve sheridan
  Where is steve sheridan?
 California - United States
 steve sheridan
 To: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Yousfi Benameur
Subject: RE: container data to populate a table
Thread ID: 311099 Message ID: 311112 # Views: 30 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Tuesday, June 28, 2011 10:40:01 PM         

> > Hi,
> > I'm sure this is an easy question for you all, but where can I find the code that sends data from a container to a table?
> >
> > More specifically, we have a form that has a container used to enter data. A browser is attached to help look up the applicable data. I want to use this same browser on another form to send the same data to another table but I have no idea of how to accomplish this. I was thinking of copying the container to the other form, but I'm sure there is a better way. Any help is greatly appreciated.
> Not very clear. if i understand you want to convert a web table to a dbf table.
> this is the code for that using excel automation (open your web table with excel as a web page and save it as excel file and then easy to convert to dbf with IMPORT function.
> local lcfile,afile,aa
> lcFile=getfile('htm|html')  &&your web table here
> if empty(lcfile)
> return .f.
> endi
> #define xlExcel5   39
> oExcel = createobject('Excel.Application')
> oDOC=oExcel.Workbooks.open(lcFile)
> oExcel.DisplayAlerts = .F.
> oExcel.visible=.t.
> afile=addbs(justpath(lcFile))+juststem(lcfile)
> aa=oDOC.saveas(m.afile,xlExcel5)	
> oExcel.quit
> oExcel=null
> &&convert to table dbf
> IMPORT FROM (afile)  TYPE XL5 
> brow
> use

> Regards
> Yousfi Benameur

Hi Yousfi,

I wasn't clear enough, sorry. When I used the word "browser", I meant a lookup icon on the form. By clicking the icon, we can look up records, or "browse" them to find the desired choice. For example, looking at the foxite page, in the "thread filter" section the calendar icons are for what I use the term "browser". It allows the user to see a list of possible choices.
The container to which I referred contains a lookup icon to see the possible choices for the form. I wish to use that same lookup list on another form to populate a field in another table. The field does have the same title in the original table and the one to which I want the data to go from the other form.

Best Regards,


container data to populate a table Posted by steve sheridan @ 6/28/2011 9:05:27 PM
RE: container data to populate a table Posted by Yousfi Benameur @ 6/28/2011 10:31:22 PM
RE: container data to populate a table Posted by steve sheridan @ 6/28/2011 10:40:01 PM