Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cecil Champenois
  Where is Cecil Champenois?
 Little Elm
 Texas - United States
 Cecil Champenois
 To: Ali Koumaiha
  Where is Ali Koumaiha?
 Farmington Hills
 Michigan - Lebanon
 Ali Koumaiha
 Tags
Subject: RE: Loop through and rename labels
Thread ID: 416077 Message ID: 416098 # Views: 45 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Sunday, December 21, 2014 4:18:53 PM         
   


> > Thank you, Ali. Okay, so the Transform() function converts the number to a character data type. Cool. I've used the macro expansion before, but didn't remember the two dots.
> >
> > So, Ali, how would you handle what follows, which isn't working? It appears that the "&y" has to be the last item to follow the variable name. But what do you do when you want the Truck Number to be a part of the control name, as in the following attempt:
> >
> > * This may work.
> > ThisForm.lblTruck&y.Driver1Shift1.Caption
> > 

> > Cecil Champenois, Jr.
>
> How is it now? without the macro?
>
> thisform.lblTruck1.Driver1shift1.caption
> thisform.lblTruck2.Driver1shift1.caption
>
> or
>
> thisform.lblTruck1.Driver1shift1.caption
> thisform.lblTruck2.Driver2shift2.caption
> thisform.lblTruck3.Driver3shift3.caption
>
> ?
>
>
> Ez Logic

The example you did was perfect and laid out what I needed to do. I forgot to update my 2nd posting, but it was working and I finally understood what to do when there are several "layers".

In your first example, there were two dots only because the macro was next to the property; the first dot was used to end the macro and the second to separate the control name from its property name.

If you go back to my second posting, you will see I updated it more fully this morning.

Thank you, Ali!

Cecil Champenois, Jr.

ENTIRE THREAD

Loop through and rename labels Posted by Cecil Champenois @ 12/21/2014 12:23:21 AM
RE: Loop through and rename labels Posted by Ali Koumaiha @ 12/21/2014 4:02:23 AM
RE: Loop through and rename labels Posted by Cecil Champenois @ 12/21/2014 4:31:08 AM
RE: Loop through and rename labels Posted by Stefan Wuebbe @ 12/21/2014 7:09:36 AM
RE: Loop through and rename labels Posted by Ali Koumaiha @ 12/21/2014 12:34:19 PM
RE: Loop through and rename labels Posted by Cecil Champenois @ 12/21/2014 4:18:53 PM
RE: Loop through and rename labels Posted by Mike Yearwood @ 12/22/2014 3:35:51 PM
RE: Loop through and rename labels Posted by Cecil Champenois @ 12/22/2014 4:58:32 PM
RE: Loop through and rename labels Posted by Victor Espina @ 12/23/2014 1:05:58 AM
RE: Loop through and rename labels Posted by Bernard Bout @ 12/24/2014 4:19:23 AM