tab control subform allowadditions visible

G

Guest

I have a main form with a combo box and tab controls. The Tab control has
subforms. The subform displays information for the reord id selected in the
combo box. I am trying to set the .allowadditons for the subform and .visble
for a button on the control form based on wheteher the is null (no record) or
not. Have tried
Me!TabCtl53("OutsideIssues").Form.AllowAdditions = True
Me!fOutsideIssues.AddBtn.Visible = True and various permutations without
success. The requery from the afterupdate of the combo box works, but not for
the above . Have linked to the on click of a control on the subform, but taht
requires the user to click in the control; also can't reset...tried various
things at form and control level including exit, lost focus and current on
other forms. I suspect I am trying to access the control/form using
inappropriate naming convention. Any help owuld be appreciated.
 
A

Al Camp

Lou,
This appears to be the same question as your "tab control subform change value" posted
on 6/27.
Please see my response to that post.
 
G

Guest

It is; I have tried your suggestion: code :
Me!fOutsideIssues.Requery
If IsNull(Me!OutsideIssues.[SAPEMPID]) Then
Me!OutsideIssues.Form.AllowAdditions = True
Me!OutsideIssues.AddBtn.Visible = True
Else
Me!OutsideIssues.AddBtn.Visible = False
Me!OutsideIssues.Form.AllowAdditions = False
End If
Me.Repaint

The foutsideissues is the subform name, outsideissues is the "other" name on
the control; have tried it both ways.

Am getting the error: "Runtime Error 438 Object doesn't support this
property or Method" on the IF statement.

Thoughts?
 
A

Al Camp

You wote...
The foutsideissues is the subform name, outsideissues is the "other" name on
the control; have tried it both ways.
That's not clear... what do you mean by "other name"... the Name property of the
subform, as opposed to the SourceObject?

What line of code is failing? Try a breakpoint in your code, and when it breaks, hit
F8 to step through the code to see which line brings up the error.

I'm thinking...
If the subform SourceObject property is fOutsideIssues, and the Name property is
OutsideIssues,
then you should be referring to OutsideIssues in any code.

OutsideIssues.Requery

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


LightningLou said:
It is; I have tried your suggestion: code :
Me!fOutsideIssues.Requery
If IsNull(Me!OutsideIssues.[SAPEMPID]) Then
Me!OutsideIssues.Form.AllowAdditions = True
Me!OutsideIssues.AddBtn.Visible = True
Else
Me!OutsideIssues.AddBtn.Visible = False
Me!OutsideIssues.Form.AllowAdditions = False
End If
Me.Repaint

The foutsideissues is the subform name, outsideissues is the "other" name on
the control; have tried it both ways.

Am getting the error: "Runtime Error 438 Object doesn't support this
property or Method" on the IF statement.

Thoughts?



Al Camp said:
Lou,
This appears to be the same question as your "tab control subform change value"
posted
on 6/27.
Please see my response to that post.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
G

Guest

subform SourceObject property is fOutsideIssues, and the Name property is
OutsideIssues
This is the reference on the Tab Control...recall the subform is on a Tab on
the Main Form.

Your suggestion of OutsideIssues.Requery does not work, the code is working
referencing
fOutsideIssues.Requery. That is why I have tried various combinations.

No need for a breakpoint as I know where it is failing (the point of my
question):
Program is Failing on: If IsNull(Me!OutsideIssues.[SAPEMPID]) Then
and giving the message cited in earlier post.

Anything else occur to you, or does the fact that this is in the context of
a Tab control help?
Thanks

Al Camp said:
You wote...
The foutsideissues is the subform name, outsideissues is the "other" name on
the control; have tried it both ways.
That's not clear... what do you mean by "other name"... the Name property of the
subform, as opposed to the SourceObject?

What line of code is failing? Try a breakpoint in your code, and when it breaks, hit
F8 to step through the code to see which line brings up the error.

I'm thinking...
If the subform SourceObject property is fOutsideIssues, and the Name property is
OutsideIssues,
then you should be referring to OutsideIssues in any code.

OutsideIssues.Requery

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


LightningLou said:
It is; I have tried your suggestion: code :
Me!fOutsideIssues.Requery
If IsNull(Me!OutsideIssues.[SAPEMPID]) Then
Me!OutsideIssues.Form.AllowAdditions = True
Me!OutsideIssues.AddBtn.Visible = True
Else
Me!OutsideIssues.AddBtn.Visible = False
Me!OutsideIssues.Form.AllowAdditions = False
End If
Me.Repaint

The foutsideissues is the subform name, outsideissues is the "other" name on
the control; have tried it both ways.

Am getting the error: "Runtime Error 438 Object doesn't support this
property or Method" on the IF statement.

Thoughts?



Al Camp said:
Lou,
This appears to be the same question as your "tab control subform change value"
posted
on 6/27.
Please see my response to that post.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

I have a main form with a combo box and tab controls. The Tab control has
subforms. The subform displays information for the reord id selected in the
combo box. I am trying to set the .allowadditons for the subform and .visble
for a button on the control form based on wheteher the is null (no record) or
not. Have tried
Me!TabCtl53("OutsideIssues").Form.AllowAdditions = True
Me!fOutsideIssues.AddBtn.Visible = True and various permutations without
success. The requery from the afterupdate of the combo box works, but not for
the above . Have linked to the on click of a control on the subform, but taht
requires the user to click in the control; also can't reset...tried various
things at form and control level including exit, lost focus and current on
other forms. I suspect I am trying to access the control/form using
inappropriate naming convention. Any help owuld be appreciated.
 
A

Al Camp

Try...
IsNull(Me!OutsideIssues.Form![SAPEMPID])

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

LightningLou said:
subform SourceObject property is fOutsideIssues, and the Name property is
OutsideIssues
This is the reference on the Tab Control...recall the subform is on a Tab on
the Main Form.

Your suggestion of OutsideIssues.Requery does not work, the code is working
referencing
fOutsideIssues.Requery. That is why I have tried various combinations.

No need for a breakpoint as I know where it is failing (the point of my
question):
Program is Failing on: If IsNull(Me!OutsideIssues.[SAPEMPID]) Then
and giving the message cited in earlier post.

Anything else occur to you, or does the fact that this is in the context of
a Tab control help?
Thanks

Al Camp said:
You wote...
The foutsideissues is the subform name, outsideissues is the "other" name on
the control; have tried it both ways.
That's not clear... what do you mean by "other name"... the Name property of the
subform, as opposed to the SourceObject?

What line of code is failing? Try a breakpoint in your code, and when it breaks,
hit
F8 to step through the code to see which line brings up the error.

I'm thinking...
If the subform SourceObject property is fOutsideIssues, and the Name property is
OutsideIssues,
then you should be referring to OutsideIssues in any code.

OutsideIssues.Requery

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


LightningLou said:
It is; I have tried your suggestion: code :
Me!fOutsideIssues.Requery
If IsNull(Me!OutsideIssues.[SAPEMPID]) Then
Me!OutsideIssues.Form.AllowAdditions = True
Me!OutsideIssues.AddBtn.Visible = True
Else
Me!OutsideIssues.AddBtn.Visible = False
Me!OutsideIssues.Form.AllowAdditions = False
End If
Me.Repaint

The foutsideissues is the subform name, outsideissues is the "other" name on
the control; have tried it both ways.

Am getting the error: "Runtime Error 438 Object doesn't support this
property or Method" on the IF statement.

Thoughts?



:

Lou,
This appears to be the same question as your "tab control subform change value"
posted
on 6/27.
Please see my response to that post.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

I have a main form with a combo box and tab controls. The Tab control has
subforms. The subform displays information for the reord id selected in the
combo box. I am trying to set the .allowadditons for the subform and .visble
for a button on the control form based on wheteher the is null (no record) or
not. Have tried
Me!TabCtl53("OutsideIssues").Form.AllowAdditions = True
Me!fOutsideIssues.AddBtn.Visible = True and various permutations without
success. The requery from the afterupdate of the combo box works, but not for
the above . Have linked to the on click of a control on the subform, but taht
requires the user to click in the control; also can't reset...tried various
things at form and control level including exit, lost focus and current on
other forms. I suspect I am trying to access the control/form using
inappropriate naming convention. Any help owuld be appreciated.
 

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