combo box data entry error

  • Thread starter pubdude2003 via AccessMonster.com
  • Start date
P

pubdude2003 via AccessMonster.com

I have a pop up modular form (Prices) that is opened from another pop up
modular form (Calcs) that seems to ignore the very first keystroke in the
combo box on the Prices form. If I open it directly it functions fine but
when it's opened from the Calcs form (using a trapped Alt key) it totally
ignores the first keystroke and only starts the list lookup upon the second
keystroke....

any insights would be appreciated!
 
R

ruralguy via AccessMonster.com

What event are you using to detect the <ALT> key? AFAIK you can not look at
the <ALT> key without also having a standard key.
 
P

pubdude2003 via AccessMonster.com

hey ruralguy.... any snow yet?

here's the code I am using to open the form, the calcs form is a calculator
and the prices is a small pop up I am using to pop one field of the calcs
form... I am afraid that I don't know what you mean by "you can not look at
the <ALT> key without also having a standard key"

Select Case KeyCode
Case 111, 191 'Divide
KeyCode = 0
Me.hiddensym1 = "/"
DoCmd.GoToControl "2"
Case 106 'Multiply
KeyCode = 0
Me.hiddensym1 = "*"
DoCmd.GoToControl "2"
Case 107 'Addition
KeyCode = 0
Me.hiddensym1 = "+"
DoCmd.GoToControl "2"
Case 109, 189 'Minus
KeyCode = 0
Me.hiddensym1 = "-"
DoCmd.GoToControl "2"
Case 32 'Space+
KeyCode = 0
CloseCalcsForm
End Select
If Shift = 4 Then
With Me.ActiveControl
.SelStart = 0
.SelLength = Len(.Text)
End With
DoCmd.OpenForm "StockPricesPopUp"
End If
 
P

pubdude2003 via AccessMonster.com

yep, I just trapped another key and it works fine... just something about the
Alt key trap... weird eh? whoops, gave away my Canadian status there....

Is there a way around this?
 
R

ruralguy via AccessMonster.com

No snow yet. What event is this code in?
hey ruralguy.... any snow yet?

here's the code I am using to open the form, the calcs form is a calculator
and the prices is a small pop up I am using to pop one field of the calcs
form... I am afraid that I don't know what you mean by "you can not look at
the <ALT> key without also having a standard key"

Select Case KeyCode
Case 111, 191 'Divide
KeyCode = 0
Me.hiddensym1 = "/"
DoCmd.GoToControl "2"
Case 106 'Multiply
KeyCode = 0
Me.hiddensym1 = "*"
DoCmd.GoToControl "2"
Case 107 'Addition
KeyCode = 0
Me.hiddensym1 = "+"
DoCmd.GoToControl "2"
Case 109, 189 'Minus
KeyCode = 0
Me.hiddensym1 = "-"
DoCmd.GoToControl "2"
Case 32 'Space+
KeyCode = 0
CloseCalcsForm
End Select
If Shift = 4 Then
With Me.ActiveControl
.SelStart = 0
.SelLength = Len(.Text)
End With
DoCmd.OpenForm "StockPricesPopUp"
End If
 
R

ruralguy via AccessMonster.com

What other key did you trap and what action was taken? What key are you
trying to pass to the next form?
 
P

pubdude2003 via AccessMonster.com

thanks for looking at my post ruralguy... I think I will just open this form
with a trapped Ctrl key instead... seems to work fine

thanks for letting me know about the Alt key
 
R

ruralguy via AccessMonster.com

AFAIK the Ctrl key should act that same as the Alt key. Any chance you could
send me a sample of your db that demonstrates this issue? I get the feeling
something else is going on here. My addy is Rural Guy at Wild Blue dot Net
if you can see your way clear to let me have a sample. Remove any sensitive
data of course. Thanks.
 
Top