Solved Crashing while hitting enter button (1 Viewer)

jack555

Member
Local time
Today, 18:35
Joined
Apr 20, 2020
Messages
93
A search box is linked with a navigation form to filter the items. After inputting data in the search text box if I hit the enter button (habitual) the entire MS access not responding and crash. What would be the underlying reason? how to avoid this crash?
 

Minty

AWF VIP
Local time
Today, 14:35
Joined
Jul 26, 2013
Messages
10,355
Not much to go on here.
What is the code associated with the control or the form that could be firing causing a crash?
 

jack555

Member
Local time
Today, 18:35
Joined
Apr 20, 2020
Messages
93
Controls
Textbox
Search button

Textbox - no code any event
Search button - is acutally a navigation form with a query linked to search texbox. (first form in navigation form is hidden to show blank screen on load). No code on the search button as well.

scenario - when the text box is empty, enter key takes to the next control. if the textbox has some characters, then enter key action crashes the app.

screenshot attached.
1629368792340.png
 

Minty

AWF VIP
Local time
Today, 14:35
Joined
Jul 26, 2013
Messages
10,355
Okay, that's not helping I'm afraid.
Can you post up a copy of the database, strip out any sensitive data, compact and repair it, then zip it up to attach it here.
Just need enough of it to replicate the problem.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:35
Joined
May 7, 2009
Messages
19,175
why not show a blank Navigation subform?
 

jack555

Member
Local time
Today, 18:35
Joined
Apr 20, 2020
Messages
93
Okay, that's not helping I'm afraid.
Can you post up a copy of the database, strip out any sensitive data, compact and repair it, then zip it up to attach it here.
Just need enough of it to replicate the problem.

Attached the db.

frmHistoSearch is the main form. "Enter" activity key in the blank text box takes to the next control. but "enter" key activity while some text in the textbox makes the db crashing. Please help to troubleshoot this. thank you.
 

Attachments

  • enter key error.zip
    28.8 KB · Views: 313

Minty

AWF VIP
Local time
Today, 14:35
Joined
Jul 26, 2013
Messages
10,355
Move the control away from the navigation option buttons at the top, it thinks you are pressing them.

This works fine
1629372355231.png
 

Minty

AWF VIP
Local time
Today, 14:35
Joined
Jul 26, 2013
Messages
10,355
TBH - I was slightly surprised at the cause of the issue.
However, when dealing with tab controls, you really don't want things overlapping the actual tabs.
They might either prevent someone pressing them completely or as in your case get some unexpected results.

You could simply move it above the tabs.

I don't use the inbuilt navigation forms, they put too many constraints on what I would call "normal" use.
I always create my own custom menus.
 

jack555

Member
Local time
Today, 18:35
Joined
Apr 20, 2020
Messages
93
TBH - I was slightly surprised at the cause of the issue.
However, when dealing with tab controls, you really don't want things overlapping the actual tabs.
They might either prevent someone pressing them completely or as in your case get some unexpected results.

You could simply move it above the tabs.

I don't use the inbuilt navigation forms, they put too many constraints on what I would call "normal" use.
I always create my own custom menus.
Thank you. I will move it above the tabs. I am a beginner to MS Access, could you please refer me to resources about building custom menus, if possible.
 

Minty

AWF VIP
Local time
Today, 14:35
Joined
Jul 26, 2013
Messages
10,355
There are many ways to create a custom menu.
It depends on how much time and what level of complexity you want.

I generally use a simple form with command buttons as a main menu, or sometimes a tabbed form to effectively switch between different banks of command buttons. The sample menu below uses the three large buttons at the top to switch tabs in the bottom section revealing other relevant commands, but this is only one way of presenting this.
1629885325562.png
 

Users who are viewing this thread

Top Bottom