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

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V  1 2 >  (Go to first unread post)
   Reply to this topicStart new topic
> Navigation Form, Access 2016    
 
   
payfast8898
post May 23 2019, 01:53 PM
Post#1



Posts: 293
Joined: 23-April 15
From: NY


Does anyone know how to simulate a pressed key on a navigation form?
I have a series of forms a client has to fill out and I have it setup so they can go to the next tab without lifting the mouse and keeping hands on the keyboard.
I have no problem changing the subform however the tab keys stay the same color.
I can program the tab keys to change color however the pressed one still stays the same color. the client wants to be able to follow the screen by looking at the tab color.
so it there a way to change the pressed key so one goes back to original color and the other one goes to pressed color.

Thanks for checking this out
Attached File(s)
Attached File  Navscreen.JPG ( 52.5K )Number of downloads: 17
 

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
theDBguy
post May 23 2019, 02:02 PM
Post#2


Access Wiki and Forums Moderator
Posts: 76,064
Joined: 19-June 07
From: SunnySandyEggo


Hi. I haven't tried but would setting the focus to the desired tab change its color?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
gemmathehusky
post May 23 2019, 02:46 PM
Post#3


UtterAccess VIP
Posts: 4,725
Joined: 5-June 07
From: UK


With controls you normally use the got focus/lost focus to modify the appearance.

Their doesn't seem to be that option with a tab control, although the active tab shows a different colour in the header. If you move to a control on a tab, doesn't that page automatically
become selected?


I am talking about a tab control, rather than the "navigation form", which seems like a new construct to me?

--------------------
Dave (Male)

(Gemma was my dog)
Go to the top of the page
 
payfast8898
post May 24 2019, 01:07 AM
Post#4



Posts: 293
Joined: 23-April 15
From: NY


DBguy no it don't and gemmathehusky no, after it gets the focus you have to hit the enter key

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
gemmathehusky
post May 24 2019, 05:48 AM
Post#5


UtterAccess VIP
Posts: 4,725
Joined: 5-June 07
From: UK


out of interest, then how do you use keyboard only to navigate to a different tab.
Can you show us the code you are using? Are you just pressing the tab key, or something else.

I originally thought you were talking about a tab control within a form. You aren't are you? You are talking about separate forms presented as tabbed documents rather than overlapping.

so if you don't select a control on a form, to give that form the focus (and thereby change the selected tab) how do you expect it to happen?

--------------------
Dave (Male)

(Gemma was my dog)
Go to the top of the page
 
missinglinq
post May 24 2019, 06:53 AM
Post#6



Posts: 4,628
Joined: 11-November 02



Yes, Dave, the Navigation Form is a new thing...added as of v2010, I believe...and much like the old Switchboards, generally eschewed by experienced developers...much for the same reasons.

While added to make the task of easily letting your fingers do the walking thru your database...it generally makes almost all other tasks more complicated!

The biggest negative, with the Navigation Form, is that all of the Forms on it have to be treated as Subforms, will all that this entails. As with the Switchboards of days past...most developers prefer 'rolling their own.'

And I'm pretty sure that we aren't, in fact, talking about Subforms on a Tabbed Control...but the normal presentation of Forms on the Nav Form.

Of course, I'm confused about even going to the trouble of writing code to switch Forms without using the mouse! Even in a production data entry situation, it seems to have little real advantage.

Linq ;0)>

--------------------
Hope this helps!

The problem with making anything foolproof...is that fools are so darn ingenious!

All posts/responses based on Access 2003/2007
Go to the top of the page
 
gemmathehusky
post May 24 2019, 07:28 AM
Post#7


UtterAccess VIP
Posts: 4,725
Joined: 5-June 07
From: UK


I had never seen the navigation from before - I just noticed it as a tool on the A2016 toolbar.

In that case, How is the navigation from different from selecting "tabbed windows" rather than "overlapping windows" in the access options?

--------------------
Dave (Male)

(Gemma was my dog)
Go to the top of the page
 
payfast8898
post May 24 2019, 08:27 AM
Post#8



Posts: 293
Joined: 23-April 15
From: NY


I have manually made them for years, they basically open subform so I can open hundreds of forms without ever leaving the main navigation form. the data entry our clients do it is a lot better for them and stuff don't look like its really opening and closing if that make sense.

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
Minty
post May 24 2019, 08:43 AM
Post#9



Posts: 312
Joined: 5-July 16
From: UK - Wiltshire


@Dave - The inbuilt navigation form loads it's target forms as Sub forms within the Navigation form, but effectively only uses one sub-form container and swaps the forms in and out.
It's clever, but very confusing to the uninitiated if you think the other forms are still open, and want to reference something on them.

It also makes writing sub form references a nightmare, as you are effectively already one subform level in, but don't necessarily realise it.
Go to the top of the page
 
payfast8898
post May 24 2019, 09:42 AM
Post#10



Posts: 293
Joined: 23-April 15
From: NY


Ok after playing around this is what I came up with.

CODE
Forms![PatientSwitchboard].[NavigationButton69].SetFocus
Sendkeys "{Enter}"


As I said I had no problem changing content but had to find a way to press the button so on press color would change. I hate using the sendkeys but seems to work perfect. Set focus to the button and hit enter using the send keys, if someone knows how to do it without using send keys I would like to try that thanks.

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
theDBguy
post May 24 2019, 09:44 AM
Post#11


Access Wiki and Forums Moderator
Posts: 76,064
Joined: 19-June 07
From: SunnySandyEggo


Hi. Congratulations! Glad to hear you found a solution. Coincidentally, I just played with it as well and was able to use the BrowseTo command (on a button) to make it work. Cheers!

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
payfast8898
post May 24 2019, 09:55 AM
Post#12



Posts: 293
Joined: 23-April 15
From: NY


DB I tried the browse to which brought up the subform no problem but didn't change the button status, how did you get it to change can you share the code please?

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
theDBguy
post May 24 2019, 10:08 AM
Post#13


Access Wiki and Forums Moderator
Posts: 76,064
Joined: 19-June 07
From: SunnySandyEggo


Hi. Since I had no idea how you're moving from one tab to another without using the mouse, I just used a button, and here's the code I used in the Click event.
CODE
Private Sub Command11_Click()
DoCmd.BrowseTo acBrowseToForm, "Form2", "Navigation Form.NavigationSubform"

End Sub
This changes the subform and highlights the button associated with it.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
payfast8898
post May 25 2019, 09:40 AM
Post#14



Posts: 293
Joined: 23-April 15
From: NY


The button is on the subform that they are entering on and when comes to the last field go's to the next button and they hit enter and should go to the next tab. it's not on the same form or I wouldn't need the button they could just hit the tab. how can we change your code to work with that?

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
theDBguy
post May 25 2019, 10:06 AM
Post#15


Access Wiki and Forums Moderator
Posts: 76,064
Joined: 19-June 07
From: SunnySandyEggo


Hi. Thanks for the clarification. So, I moved my button to a subform, and it still worked without changing the code. Give it a try and let us know what happens.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
payfast8898
post May 25 2019, 10:30 AM
Post#16



Posts: 293
Joined: 23-April 15
From: NY


Maybe it would help if I knew what form was what in your code, what is the subform name and main form name, I could be doing something wrong I keep getting invalid path. thanks

CODE
DoCmd.BrowseTo acBrowseToForm, "Form2", "Navigation Form.NavigationSubform

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
theDBguy
post May 25 2019, 10:50 AM
Post#17


Access Wiki and Forums Moderator
Posts: 76,064
Joined: 19-June 07
From: SunnySandyEggo


Sure... So, "Form2" is the name of the form loaded in the second tab of my Nav Form. "Navigation Form" is the name of my Nav Form (I just used the Wizard to create it, so this is the default name assigned by Access). And "NavigationSubform" is the subform container where "Form2" is displayed when I click on the second tab on my Nav Form (again, this is the default name assigned by the Access Wizard when I created the Nav Form). Does that help?
So, if I click on Tab 1 of my Nav Form, I see "Form1." If I click on Tab 2 of my Nav Form, I see "Form 2". If I click on Tab 3 of my Nav Form, I see "Form3." On "Form3," I put the button I described earlier (it used to be on the Nav Form itself). When I click this button on "Form3," Tab 2 gets highlighted and the Nav Form loads "Form2."

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
payfast8898
post May 25 2019, 12:22 PM
Post#18



Posts: 293
Joined: 23-April 15
From: NY


ok your space was messing me up, I was hoping that was what I was missing, however this I have done already and as I said mine changes the sub form fine but it don't highlight my tab the original one keeps pressed. I wonder if the form's have to be the same name as the buttons or something like that?

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
theDBguy
post May 25 2019, 12:36 PM
Post#19


Access Wiki and Forums Moderator
Posts: 76,064
Joined: 19-June 07
From: SunnySandyEggo


Hi. As I said, I used the Wizard because I just wanted to do a quick test for you. How exactly did you create your Nav Form?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
payfast8898
post May 25 2019, 12:38 PM
Post#20



Posts: 293
Joined: 23-April 15
From: NY


I changed names and that didn't help, mines just not firing the color changing I do believe it is changing the tab position so it is working on that part just not changing the coloring. so don't worry about it what I have works great with not much coding thanks for looking into it I appreciate it.

--------------------
"When a collection of Brilliant minds, hearts and talents come together...
Expect a masterpiece"
Go to the top of the page
 
2 Pages V  1 2 >


Custom Search


RSSSearch   Top   Lo-Fi    21st August 2019 - 08:22 PM