In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Access control properties at runtime using macro ?? Expert needed!

Xailer professional forum in English
ChrisGillard
Mensajes: 384
Registrado: Mar May 01, 2007 5:49 pm

Access control properties at runtime using macro ?? Expert needed!

Mensaje por ChrisGillard »

Hi,
I have 12 TDatePicker Controls on my form.
They are names oDatePicker1 to oDatePicker12.
I want to set their values in a loop so would like to write something like
this ...... can this be done ??
&( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) := dPeriodEndDate
This results in a GPF Access code 000005.
I suspect my problem it is to do with the :: object reference or something ?
The nearest I can get is this code that does work and works as expected in
the loop
&( "logdisplay(" + str( n ) + ")" )
My alternative approach would be to add all the oDatePicker controls to an
array and access them using
aControls[n]:dValue .... I'm sure this would work.
But I would like to know if its possible to do using the macro &.
Thanks
Chris Gillard
Responder