Code for changing a subform Name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form where the user selects their criteria and then opens a subform
in datasheet view. Based on the user criteria, I want to change the Header
names (.Name field) of the subform columns. How and where should I apply the
code to change the subform!Column.Name before the subform is displayed to the
user?

Thanks,
matt
 
Where := Give each control an associated label, and change the caption.

How := with VBA code
 
I am not sure I understand, the query displays in datasheet view. I only
have the option of changing the Name property, which will then be applied to
the Header names. Caption is not an available property or am I missing
something?

Everytime I try using the code Form.Column.Name = "NewLabel" in FormLoad ,
it says first to open the form in design view.
 
Back
Top