controlling tab behavior on a form

  • Thread starter thrashin via AccessMonster.com
  • Start date
T

thrashin via AccessMonster.com

I have researched this topic elsewhere but, what I have learned is not quite
answering my problem entirely. I can control the way the tab behavior of my
10 text boxes work by using the tab stop method and tab order. But, what I
can't seem to fathom is why when I reach my 10th control with the tab key and
press it one more time, I see a dialog box that says, "Enter Parameter Value".
For some reason it is like my sub form (which I only have one and has a query
as its record source) is trying to run again.

I have a database that has a custom form for my switchboard (rather than
using the standard Access one)that when it loads it has a command button on
it. When I press the command button, on the form, it asks me to enter in
some data, then opens my form for editing. The form that opens has 10 text
boxes of which I want to control the tab order. When I reach the last text
box and click tab one more time, a parameter query box appears just like the
one from my custom switchboard initial form with the command button.

I want the user to cycle through my 10 text boxes on the form without a
parameter query prompt appearing. What could cause this behavior? I tried
using DoCmd.Close acform, [name of form], acsaveno because, I thought the
presence of the custom switchboard form would cause that parameter query to
appear. Could my subform be the culprit? I tried setting that tab stop to
no and that did nothing. I just want the users to be prompted to enter
something in that parameter box on the main custom switchboard then, be able
to tab from text box to text box around the form that opens up?

Thank you for all your help.
 
D

Duncan Bachen

thrashin said:
I have researched this topic elsewhere but, what I have learned is not quite
answering my problem entirely. I can control the way the tab behavior of my
10 text boxes work by using the tab stop method and tab order. But, what I
can't seem to fathom is why when I reach my 10th control with the tab key and
press it one more time, I see a dialog box that says, "Enter Parameter Value".
For some reason it is like my sub form (which I only have one and has a query
as its record source) is trying to run again.

The form has a cycle property that determines what to do after the last
control loses focus. Should it go to the next record, or start back over
on the first field of the current record?

It sounds like you want it to cycle through the current record, not all
records. That could be because of the way your form is designed, and
it's prompting for criteria each time it moves to a new record.

If you have your record selectors showing, try navigating to the next
record that way and see if it exhibits the same behavior.
 
T

thrashin via AccessMonster.com

Thank you Duncan! Choosing Cycle - Current Record instead of all records did
the trick!. I also shut off record selectors, navigation buttons, dividing
lines as well. When I clicked record selector forward I got the parameter
query entry box. Is there a way to make a button on my form disappear on
load or runtime and appear if I press a certain spot on the form with a
series of keypresses and a click of the mouse? Say you had a picture of a
Manager with a tie on. You clicked his Tie and the button would appear on
the form.

Thrashin


Duncan said:
I have researched this topic elsewhere but, what I have learned is not quite
answering my problem entirely. I can control the way the tab behavior of my
[quoted text clipped - 3 lines]
For some reason it is like my sub form (which I only have one and has a query
as its record source) is trying to run again.

The form has a cycle property that determines what to do after the last
control loses focus. Should it go to the next record, or start back over
on the first field of the current record?

It sounds like you want it to cycle through the current record, not all
records. That could be because of the way your form is designed, and
it's prompting for criteria each time it moves to a new record.

If you have your record selectors showing, try navigating to the next
record that way and see if it exhibits the same behavior.
 
D

Duncan Bachen

thrashin said:
Thank you Duncan! Choosing Cycle - Current Record instead of all records did
the trick!. I also shut off record selectors, navigation buttons, dividing
lines as well. When I clicked record selector forward I got the parameter
query entry box.

This is because of the design of your form. It needs the information you
are supplying to the parameter in order to display the record. Not
knowing how your form is designed, I can't tell you if that is necessary
or not.

My initial guess is that it's not, and there is a better way to design
it. You shouldn't have to reenter the parameter multiple times.
Is there a way to make a button on my form disappear on
load or runtime and appear if I press a certain spot on the form with a
series of keypresses and a click of the mouse? Say you had a picture of a
Manager with a tie on. You clicked his Tie and the button would appear on
the form.

Yes and no. You can use the Click event of the form (or individual
objects) to determine if they've been clicked or not, and then set the
visibility of a command button to true (having previous set it to false).

However, trying to determine the X/Y coordinate of the mouse against an
image on multiple PCs is something that's alot more advanced than I can
tackle with you.
 
T

thrashin via AccessMonster.com

Thank you Duncan for all your advice. I was able to not only get my tab
order working but, also put checks into the click event of the command button
that will make sure a user puts a value in every required text box and combo
box or else they will be hit with an alarm sound, set focus to that specific
text box, and change the back ground color of that control.

The reason why I have the parameter query when they click the main switch
board form button is to limit the user to entering data into a table one item
at a time. I want them to be forced to think about what they are entering
because what they enter is eventually saved into an export csv file for later
import into a main server. The form closes after each text box is filled,
the save button is pressed, the append query runs, the data is saved to a
table, a make table query runs to only make a table with data that has to be
exported in a specific order from left to right formatted in the right
width/length, etc.

Thank you again for all your help.

Thrashin
 

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