Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

rename control in the subform

In my subform, Access 2000, i have controls which i want to rename but i
do not want to change the real names of the fields in the
tables,nor add the name to the Caption in the field of the
table.Is it possible ?
For example, in the table [Order details] i have a field called Quantity.I want to rename it to Pieces.I want to do it in the subform,and not in the table itself, where i might have written the word Pieces in the field Caption.I have tried to rename the field from the main form but i did not succeed. The problem is that the subfom is in a datasheet format and i cannot just rename the control.Is it impossible to do so ?
[668 byte] By [pooter] at [2007-11-11 7:05:39]
# 1 Re: rename control in the subform
If you mean how you reference the data after it is queried and in your form, you can add the AS clause to your SQL to rename the column reference without changing the column name.

SELECT Quantity AS Pieces
FROM [Order Details]

There after, your reference to that column of data in the recordset is always 'Pieces', such as rs.Pieces.

If you meant otherwise, please submit a code snippet.

Good luck,
msanchez at 2007-11-11 17:27:26 >