Solved Navigation pane appears spontaniously (1 Viewer)

so10070

Registered User.
Local time
Today, 22:41
Joined
Aug 18, 2016
Messages
51
I hide the navigation pane when starting my application but after this code it appears again? Strange?

Code:
CurrentDb.Execute "SELECT * INTO [;DATABASE=" & txtDatabaseFilePadNaam & ";].tblOVSGToetsresultaten " & _
    "FROM [Excel 12.0;HDR=Yes;DATABASE=" & txtBestandPuntenBestaat & ";].[Pagina1$];", dbFailOnError
DoCmd.TransferDatabase acLink, "Microsoft Access", txtDatabaseFilePadNaam, acTable, "tblOVSGToetsresultaten", "tblOVSGToetsresultaten", False

At the end of this procedure I rewrite this code (hide navigation pane) and it disappears again.
Code:
'hide navigation pane again
'select navigation pane
DoCmd.NavigateTo "acNavigationCategoryObjectType"
'hide navigation pane
DoCmd.RunCommand acCmdWindowHide

How can I solve this problem.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:41
Joined
Oct 29, 2018
Messages
21,358
Hi. Maybe you could try using DAO code instead.
 

isladogs

MVP / VIP
Local time
Today, 21:41
Joined
Jan 14, 2017
Messages
18,186
Last edited:

isladogs

MVP / VIP
Local time
Today, 21:41
Joined
Jan 14, 2017
Messages
18,186
Yes. I just edited my post whilst you were replying
 

isladogs

MVP / VIP
Local time
Today, 21:41
Joined
Jan 14, 2017
Messages
18,186
You're welcome. I remember coming up with my own solution in an earlier thread here or at another forum but couldn't find it.
Please can you confirm that Dale Fye's code works for you
 

vhung

Member
Local time
Today, 14:41
Joined
Jul 8, 2020
Messages
235
I hide the navigation pane when starting my application but after this code it appears again? Strange?

Code:
CurrentDb.Execute "SELECT * INTO [;DATABASE=" & txtDatabaseFilePadNaam & ";].tblOVSGToetsresultaten " & _
    "FROM [Excel 12.0;HDR=Yes;DATABASE=" & txtBestandPuntenBestaat & ";].[Pagina1$];", dbFailOnError
DoCmd.TransferDatabase acLink, "Microsoft Access", txtDatabaseFilePadNaam, acTable, "tblOVSGToetsresultaten", "tblOVSGToetsresultaten", False

At the end of this procedure I rewrite this code (hide navigation pane) and it disappears again.
Code:
'hide navigation pane again
'select navigation pane
DoCmd.NavigateTo "acNavigationCategoryObjectType"
'hide navigation pane
DoCmd.RunCommand acCmdWindowHide

How can I solve this problem.
sir; your target is good enough;
i have encountered your problem and i initially solved
try my codes for buttons and load Form
see:
Code:
 Dim objPane As Object
If [Command Prompt] = "hidepane" Then
       DoCmd.SelectObject acTable, , True
       DoCmd.RunCommand acCmdWindowHide
ElseIf [Command Prompt] = "hidepanex" Then
       DoCmd.SelectObject acTable, , True
    If Not (objPane Is Nothing) Then
       objPane.IsCollapsed = False
    End If
End If
hope you can use it.... no error code when i used it...

EDIT: @isladogs-Added code tags
 
Last edited by a moderator:

isladogs

MVP / VIP
Local time
Today, 21:41
Joined
Jan 14, 2017
Messages
18,186
@vhung
I haven't tried your code but am wondering which part of it you are referring to when you say it is new syntax
 

vhung

Member
Local time
Today, 14:41
Joined
Jul 8, 2020
Messages
235
@vhung
I haven't tried your code but am wondering which part of it you are referring to when you say it is new syntax
the syntax that i just used,
that one i post it is for real
i never use that before...
when i try it result too good...
 

Attachments

  • NavPane.png
    NavPane.png
    123.5 KB · Views: 489
  • NavPane2.png
    NavPane2.png
    169 KB · Views: 472
Last edited:

isladogs

MVP / VIP
Local time
Today, 21:41
Joined
Jan 14, 2017
Messages
18,186
Ah I see. You meant the code was new to you, rather than new to Access!😏
 

isladogs

MVP / VIP
Local time
Today, 21:41
Joined
Jan 14, 2017
Messages
18,186
@vhung
Glad to hear it. I've been using Access for over 20 years and I'm still learning new things. Good luck
 

vhung

Member
Local time
Today, 14:41
Joined
Jul 8, 2020
Messages
235
@vhung
Glad to hear it. I've been using Access for over 20 years and I'm still learning new things. Good luck
really sir;
20 years,
well for me just about 7 years i guess
>updated my Accdb "Form AddTable-Field/ChangeNameTable-Field"
I will call it 4n1 Create/UpdateTable
>Updated (Create, Add, Rename, Edit, Delete)=5n1
 

Attachments

  • Accdb Advance Features.png
    Accdb Advance Features.png
    126.6 KB · Views: 416
  • Accdb AddTable-Field,ChangeNameTable-Field.png
    Accdb AddTable-Field,ChangeNameTable-Field.png
    154.3 KB · Views: 481
  • Accdb AddTable-Field,ChangeNameTable-Field,EditField-Text3.png
    Accdb AddTable-Field,ChangeNameTable-Field,EditField-Text3.png
    65.1 KB · Views: 490
Last edited:

isladogs

MVP / VIP
Local time
Today, 21:41
Joined
Jan 14, 2017
Messages
18,186
LOL. Perhaps you're a faster learner than me!
However, I don't believe any developer is equally proficient in every area of Access or knows every feature/code item.
The more I learn, the more I realise there is to learn.
Reading and answering forum questions is a very good way of honing knowledge and filling in gaps in knowledge.

As this topic was originally about managing the application interface, you may be interested in this example app of mine: http://www.mendipdatasystems.co.uk/control-application-interface/4594365418
 

vhung

Member
Local time
Today, 14:41
Joined
Jul 8, 2020
Messages
235
LOL. Perhaps you're a faster learner than me!
However, I don't believe any developer is equally proficient in every area of Access or knows every feature/code item.
The more I learn, the more I realise there is to learn.
Reading and answering forum questions is a very good way of honing knowledge and filling in gaps in knowledge.

As this topic was originally about managing the application interface, you may be interested in this example app of mine: http://www.mendipdatasystems.co.uk/control-application-interface/4594365418
yes sir;
thank you very much...
how i wish i could totally explore Accdb Proramming
Besides i observe much those topics which i already encountered then i search on-line and execute the codes syntax...
 

isladogs

MVP / VIP
Local time
Today, 21:41
Joined
Jan 14, 2017
Messages
18,186
That's the best way. Now a request to you. Please stop using 'sir' in your responses to me or other members.
It really isn't necessary and although I am male, you have used that word in reply to at least one female member recently.
 

Users who are viewing this thread

Top Bottom