473,320 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

on enter event - nothing is happening

27
I have a search form. and many unbound control. My main search text box "txtAccount" is acting weird or I am not doing it right.

I want user to input a value and hit the enter key. I put something on the "on Enter" event but the code kicks in as soon as I load the form.

After by passing the first error I enter something in my search box and hit the enter key on my keyboard and nothing happens. I even try to put msgbox "test" on the enter event and it does not do anything.

Please advise how can i take care of this issue. i even took out the tab stop on that text box.

Thanks
Dec 13 '07 #1
2 7986
ozarka
27
I used this and now it's working.

Private Sub txtEnterLoanNum_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
f_runitnow
End If
End Sub
Dec 13 '07 #2
missinglinq
3,532 Expert 2GB
The OnEnter event fires when a text field is entered, not when the <Enter> key is pressed.

Your method should work, or Access has a property of command buttons that also would work. You simply place a button on your form to execute the code, then goto Properties - Other and set Default to Yes. Then, unless another command button has the focus (which it wouldn't if you're still in a textbox) anytime you press <Enter> the button will fire. This would give the user two ways to trigger the code (some like/expect to see a button to click on) or if you only want them to hit <Enter> goto Properties - Format and set Transparent Property to Yes.

Linq ;0)>
Dec 13 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: bullshark | last post by:
VSN03:C# Create a C# Windows Form project. Add two TextBox controls. From the Properties of each, add an Enter Event handler. In the generated Enter Event Handlers (textBox1_Enter &...
3
by: Jose Egea | last post by:
Hello: I'm trying to execute a function when the user press Enter key in a TextBox. But something is happening in my form because after pressing a button, when I press the Enter key in the...
2
by: Cindy | last post by:
Hi all you smarties out there, I'm having a little conundrum with my asp.net page Scenario: I have a form (asp.net) with no code behind (as yet). I have placed a javascript function on a...
5
by: PD | last post by:
The TextChanged event is not being called when I hit the "Enter" key. Yet it does for the "Tab" key. I set a break point in the Page_Load event and the TextChanged event and none of these get...
12
by: SJ | last post by:
Hope someone can help me out there I'm struggling with a particular problem... I have a form with many tab pages. On one tab page I've got a button which when clicked with a mouse adds items...
15
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
4
by: nkoier | last post by:
Hi, I've been going crazy trying to figure out what's wrong with our Asp.Net 2.0 intranet site. At the very top of our main page I provide a TextBox and a Button for submitting Google searches....
24
by: MichaelK | last post by:
Who knows how to prevent submitting a form on the press Enter button before all fields on the form are filled up. People just enter the first field hit Enter and it submits the form and doing...
6
by: Mark B | last post by:
I have a function that looks up a SQL table to see if a search term matches. It works fine but so far there are two things yet to work: 1) After entering a search term and pressing Enter, nothing...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.