UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Tab Control Object, Access 2010    
 
   
rizmin
post Dec 3 2017, 12:58 AM
Post#1



Posts: 118
Joined: 10-August 17



Hi UA Nation !! Great Sunday !!

I have an issue with tab control object property:

I have a tab control (Two pages) which is run in the Sub from control. I have a hidden button on the second page of tab control, But I need to use when I want to update my records.

I have used the following code but its giving runtime error 439 (As in the attached) for the following code!

CODE
[Forms]![frm_welcome]![sfmMenu]![TabCtl39].FindSN.Visible = True


How can I make it visible of this attached find button while on update view?

Thank you all
Attached File(s)
Attached File  Capture.JPG ( 248.52K )Number of downloads: 3
Attached File  Capture.JPG ( 20.11K )Number of downloads: 0
 
Go to the top of the page
 
theDBguy
post Dec 3 2017, 03:02 AM
Post#2


Access Wiki and Forums Moderator
Posts: 71,196
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Which event are you using to run this code?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
rizmin
post Dec 3 2017, 03:25 AM
Post#3



Posts: 118
Joined: 10-August 17



HI DBGuy!

Once I click the Update menu item from the side menu list the the intended update from shall appear on my subform [sfmenu]. Hidden button on the Update form should be visible onload if I clicked Update Inspection Menu.
CODE
Private Sub MENU_TEXT_Click()
If Me.Action.Value = "MENU" Then
Forms!frm_welcome!txtMenuFilter.Value = MENU_ID.Value
[Forms]![frm_welcome]![sfmMenu].SourceObject = ""
DoCmd.Requery

ElseIf Me.Action.Value = "FORM" Then

'HSEInspectionRecord
    ElseIf Me.MENU_TEXT.Value = "Update Inspection record" Then
    'DoCmd.OpenForm "HSEInspectionRecord", acNormal, , , , acWindowNormal
    [Forms]![frm_welcome]![sfmMenu].SourceObject = "HSEInspectionRecord"
    [Forms]![frm_welcome]![sfmMenu]![Find Records].Visible = True 'Working Well for first Tab
    [Forms]![frm_welcome]![sfmMenu]![TabCtl39].FindSN.Visible = True ' Error for second page of the tab
    [Forms]![frm_welcome]![sfmMenu]!txtInspectionSN.SetFocus
End If
End Sub


Hope you can get the point now.

Go to the top of the page
 
rizmin
post Dec 3 2017, 07:23 AM
Post#4



Posts: 118
Joined: 10-August 17



I hope my explanation not well enough to make you all understand, confused.gif

Any way I will try to explain in this way:

The flow of execution:

Click Update Record from Side Menu-->Open Update Form in Subform Control--> Update form contained tab control with two pages --> Second page of the tab contained subform with the hidden button, this hidden button should be visible when I am click the update Record from the main Menu. I have used the code below but showing run time error "438 Object Doesn't support this property or method":

CODE
[Forms]![frm_welcome]![sfmMenu]![TabCtl39].FindSN.Visible = True


Hope now can understand.

Go to the top of the page
 
rizmin
post Dec 3 2017, 07:43 AM
Post#5



Posts: 118
Joined: 10-August 17



Hi All !!

Finally I found the solution!!

here is the correct code :
CODE
[Forms]![frm_welcome]![sfmMenu]![HSEInspectCAPA subform]!FindSN.Visible = True


Not
CODE
[Forms]![frm_welcome]![sfmMenu]![TabCtl39].FindSN.Visible = True


Anyway thanks to all for those who viewed my post and tried to help me.

Have a nice day!! hat_tip.gif
Go to the top of the page
 
theDBguy
post Dec 3 2017, 11:37 AM
Post#6


Access Wiki and Forums Moderator
Posts: 71,196
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Congratulations! Looks like you found a solution while I was asleep. Good luck with your project.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
rizmin
post Dec 3 2017, 11:53 PM
Post#7



Posts: 118
Joined: 10-August 17



rotflmao.gif rotflmao.gif rotflmao.gif
Go to the top of the page
 
theDBguy
post Dec 4 2017, 12:29 AM
Post#8


Access Wiki and Forums Moderator
Posts: 71,196
Joined: 19-June 07
From: SunnySandyEggo


smile.gif

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    11th December 2017 - 04:20 AM