problem hiding subform field

M

Mary Fran

Trying to hide field in subform through macro dependant on mainform field and
wondering why this isn't working? (in AfterUpdate event of mainform field)
It's set value of
[Forms]![frmbilloflading]![frmBillOfLadingItems
subform].[Form]![Style].[Visible]
false and have double-checked to make sure subform control name spelled
correctly.

Thanks!
 
G

Gina Whipp

Mary Fran,

If you are referencing the control from the Main Form then use the below:

= [Subform].Form![FieldName].Visible = False

But it looks like you have placed this as a control source in a field. What
is the trigger that sets it not visible?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
M

Mary Fran

Not sure what you mean by the trigger other than to restate that the macro
fires in the AfterUpdate of the CustomerID field on the mainform. I know it's
firing b/c it works if I change it to hide a field on the mainform - just
won't hide the subform fields.


Gina Whipp said:
Mary Fran,

If you are referencing the control from the Main Form then use the below:

= [Subform].Form![FieldName].Visible = False

But it looks like you have placed this as a control source in a field. What
is the trigger that sets it not visible?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Mary Fran said:
Trying to hide field in subform through macro dependant on mainform field
and
wondering why this isn't working? (in AfterUpdate event of mainform field)
It's set value of
[Forms]![frmbilloflading]![frmBillOfLadingItems
subform].[Form]![Style].[Visible]
false and have double-checked to make sure subform control name spelled
correctly.

Thanks!
 
G

Gina Whipp

The you have a trigger... I didn't catch that info about the macro in your
first post.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Mary Fran said:
Not sure what you mean by the trigger other than to restate that the macro
fires in the AfterUpdate of the CustomerID field on the mainform. I know
it's
firing b/c it works if I change it to hide a field on the mainform - just
won't hide the subform fields.


Gina Whipp said:
Mary Fran,

If you are referencing the control from the Main Form then use the below:

= [Subform].Form![FieldName].Visible = False

But it looks like you have placed this as a control source in a field.
What
is the trigger that sets it not visible?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Mary Fran said:
Trying to hide field in subform through macro dependant on mainform
field
and
wondering why this isn't working? (in AfterUpdate event of mainform
field)
It's set value of
[Forms]![frmbilloflading]![frmBillOfLadingItems
subform].[Form]![Style].[Visible]
false and have double-checked to make sure subform control name spelled
correctly.

Thanks!
 
M

Mary Fran

Okay, I just solved my problem - by going into the VB editor and typing
? forms!frmbilloflading![frmbillofladingitems subform].form!style.visible
I got false even though the field shows on the screen - then realized the
subform is set to datasheet view - sorry to have bothered you - will have to
change from datasheet.



Gina Whipp said:
The you have a trigger... I didn't catch that info about the macro in your
first post.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Mary Fran said:
Not sure what you mean by the trigger other than to restate that the macro
fires in the AfterUpdate of the CustomerID field on the mainform. I know
it's
firing b/c it works if I change it to hide a field on the mainform - just
won't hide the subform fields.


Gina Whipp said:
Mary Fran,

If you are referencing the control from the Main Form then use the below:

= [Subform].Form![FieldName].Visible = False

But it looks like you have placed this as a control source in a field.
What
is the trigger that sets it not visible?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Trying to hide field in subform through macro dependant on mainform
field
and
wondering why this isn't working? (in AfterUpdate event of mainform
field)
It's set value of
[Forms]![frmbilloflading]![frmBillOfLadingItems
subform].[Form]![Style].[Visible]
false and have double-checked to make sure subform control name spelled
correctly.

Thanks!
 
G

Gina Whipp

No problem... I should add that my list to ask that question first!

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Mary Fran said:
Okay, I just solved my problem - by going into the VB editor and typing
? forms!frmbilloflading![frmbillofladingitems subform].form!style.visible
I got false even though the field shows on the screen - then realized the
subform is set to datasheet view - sorry to have bothered you - will have
to
change from datasheet.



Gina Whipp said:
The you have a trigger... I didn't catch that info about the macro in
your
first post.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Mary Fran said:
Not sure what you mean by the trigger other than to restate that the
macro
fires in the AfterUpdate of the CustomerID field on the mainform. I
know
it's
firing b/c it works if I change it to hide a field on the mainform -
just
won't hide the subform fields.


:

Mary Fran,

If you are referencing the control from the Main Form then use the
below:

= [Subform].Form![FieldName].Visible = False

But it looks like you have placed this as a control source in a field.
What
is the trigger that sets it not visible?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Trying to hide field in subform through macro dependant on mainform
field
and
wondering why this isn't working? (in AfterUpdate event of mainform
field)
It's set value of
[Forms]![frmbilloflading]![frmBillOfLadingItems
subform].[Form]![Style].[Visible]
false and have double-checked to make sure subform control name
spelled
correctly.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top