Changing arrow key behavior

M

Machaut

Hello,
I seem to have backed myself into an interesting and complicated corner.
I created a form (named OES) with 3 nearly identical subforms (subA, subB,
and subC).
The subforms are continuous forms of qryA, qryB, and qryC.
Each of these queries has columns |Qty|Sizes|SortRow|SortCol|
qryA:
| |3 |01|A|
| |4 |02|A|
| |5 |03|A|
| |6 |04|A|
| |7 |05|A|
| |8 |06|A|
| |9 |07|A|

qryB:
| |3.25 |01|B|
| |4.25 |02|B|
| |5.25 |03|B|
| |6.25 |04|B|
| |7.25 |05|B|
| |8.25 |06|B|
| |9.25 |07|B|

qryC:
| |3.5 |01|C|
| |4.5 |02|C|
| |5.5 |03|C|
| |6.5 |04|C|
| |7.5 |05|C|
| |8.5 |06|C|
| |9.5 |07|C|

The subforms are set side to side, showing |Qty| and |Size|, and only allow
the user to choose or change the values in |Qty|.

Is there some way of changing the arrow key behavior so that the user can
navigate (for example) from where SortRow=01 in subA (size = 3) to where
SortRow=01 in subB using the right arrow key?

Any help would be appreciated.
Thanks,
Machaut
 
M

Michel Walsh

Hi,



A form can run a public subroutine of another form:

FORMS!OtherOpenFormName.Subroutine


So, basically, have formA call a procedure in formB:


Forms!formB.MoveToRecord Me.size


where Me.size is the actual size value under formA. That code should be run
in the KeyDown event of the appropriate control of form A, after having
tested that the key down was the appropriate one.

In FormB, that has the

public sub MoveToRecord(whichSize As String)
....
end sub


wrote the appropriate code to move to the desires record.




Hoping it may help,
Vanderghast, Access MVP
 

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