Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Kevin
  Where is Kevin?
 edwardsville
 Illinois - United States
 Kevin
 To: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 Tags
Subject: RE: Table setup
Thread ID: 118706 Message ID: 154959 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Visual Basic
Date: Thursday, December 20, 2007 7:23:00 PM         
   


> >
> >
> > This is not for the End user but management when they set up what options can be used. This has to be done once a year and is very time consuming. My grid idea would speed things up tremendously.
> >
> > Thanks for the ideas!
>
> Ah - that was what I was missing. If it is for management, then the cross tab thing would work. Just build your CREATE CURSOR command on the fly:
>
>
> *** Totally untested code ***
> lcCreateCursorCmd = "CREATE CURSOR MyOptionsGridCursor (OptionName C(20), OptionID I"
> SELECT * FROM Models WHERE llFilterOutTheObsoleteModles INTO CURSOR Junk
> SCAN
>    lcCreateCursorCmd = lcCreateCursorCmd + ;
>       ", Mdl" + ALLTRIM(TRANSFORM(Junk.RecordID))+" L "
> ENDSCAN
> USE IN SELECT( [Junk] )
> lcCreateCursorCmd = lcCreateCursorCmd + ")"
> &lcCreateCursorCmd
> SELECT OptionName, RecordID FROM Options WHERE llFilterOutObsoleteOptions INTO CURSOR Junk
> SELECT Junk
> SCAN
>    INSERT INTO MyOptionsGridCursor (OptionName, OptionID) VALUES (Junk.OptionName, Junk.RecordID)
> ENDSCAN
> 

>
> This will give you a cross tab cursor with a logical field for each model plus an options name and ID field. Is this what you were looking for?
>
> Ken
> You shall know the truth - and the truth shall set you free. (John 8:33)


I will see if I can make your example work.
After thinking about it more I think I might have to have them do this one model at a time since there are over 100 models. The grid would be to large to be effective. I think a grid to list all the options with check marks for one model at a time would work and be easier to use and program. ?

ENTIRE THREAD

Table setup Posted by krbaugh baugh @ 1/16/2007 11:41:24 PM
RE: Table setup Posted by Ken Murphy @ 1/17/2007 4:44:37 AM
RE: Table setup Posted by krbaugh baugh @ 1/17/2007 5:20:06 AM
RE: Table setup Posted by Ken Murphy @ 1/17/2007 1:35:18 PM
RE: Table setup Posted by krbaugh baugh @ 1/17/2007 4:15:33 PM
RE: Table setup Posted by Ken Murphy @ 1/17/2007 5:55:13 PM
RE: Table setup Posted by Kevin @ 12/20/2007 7:56:14 AM
RE: Table setup Posted by Ken Murphy @ 12/20/2007 2:01:49 PM
RE: Table setup Posted by Kevin @ 12/20/2007 3:34:16 PM
RE: Table setup Posted by Ken Murphy @ 12/20/2007 3:53:09 PM
RE: Table setup Posted by Kevin @ 12/20/2007 7:23:00 PM
RE: Table setup Posted by Ken Murphy @ 12/20/2007 8:31:13 PM
RE: Table setup Posted by Kevin @ 12/21/2007 7:18:26 AM
RE: Table setup Posted by Ken Murphy @ 12/21/2007 1:50:29 PM
RE: Table setup Posted by Kevin @ 12/21/2007 11:57:03 PM
RE: Table setup Posted by Ken Murphy @ 12/22/2007 2:32:13 AM
RE: Table setup Posted by Kevin @ 12/22/2007 5:02:58 PM
RE: Table setup Posted by Ken Murphy @ 12/22/2007 10:13:22 PM
RE: Table setup Posted by Andy Kramek @ 1/17/2007 12:38:25 PM