473,387 Members | 1,575 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,387 software developers and data experts.

Change tab key behavior to NOT trigger combobox BeforeUpdate event ?

I have a form with a BeforeUpdate event that populates other text fields when the user makes a selection in a combobox.

I want the user to be able to enter new text into the combobox and tab to the next field without triggering the event. It seems the tab key press triggers the event as well as a selection in the combobox.

Any ideas?
Mar 27 '13 #1

✓ answered by Rabbit

The answer to your question is the same as my original answer.

8 2323
Rabbit
12,516 Expert Mod 8TB
You can't prevent it from firing but you can prevent it from running the other code by first checking if the value they entered is in the list of values.
Mar 27 '13 #2
Thanks for the reply Rabbit.

The user will likely open the combobox to see if their selection is available. If it is not available then they will begin typing. Is there a way to code the event so that if the user types input then it doesn't trigger the event?

I'm using last names so on occasion I get last names that are the in the list but not the correct person and address.
Mar 27 '13 #3
When the user enteres a last name that is in the list then the combobox automatically selects that record and populates the rest of the forms field. The user needs to be able to type a new record without the autofill.
Mar 27 '13 #4
slenish
283 100+
You could do what you need in a few different ways.

1. Create a new form that is for user entry.
2. Change the beforeUpdate event to DoCmd.GoToRecord , , acNewRec
3. Remove the BeforeUpdate event so it does not trigger the auto fill action.
Mar 27 '13 #5
Rabbit
12,516 Expert Mod 8TB
The answer to your question is the same as my original answer.
Mar 27 '13 #6
Would you mind showing me how to do that?
Mar 27 '13 #7
Thanks for thinking about this Rabbit. I think I solved this particular problem by adding an command button that executes the code to propogate my text fields. This way they can type free hand or choose a record from the combobox. I suppose it could be coded better to remove the need to click the command button but this seems to work. I do have another question related to this same topic but I suppose I will start a new thread.
Mar 27 '13 #8
Rabbit
12,516 Expert Mod 8TB
You would implement my suggestion by doing this:
Expand|Select|Wrap|Line Numbers
  1. If [the value of he combo box is in the list of values] Then
  2.    execute the rest of your code
  3. End If
That is pseudocode, the actual code will differ but the logic will be the same.

There's no need to create an extra step for them by requiring them to click a button.
Mar 27 '13 #9

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

Similar topics

17
by: Mike Gratee | last post by:
Is it possible to use JavaScript to cause the browser to click a link on a page and have the browser act exactly like the user had clicked on the link directly? In other words, I need to...
7
by: todholt | last post by:
Hello, I am trying to bypass a form's automatic update, and instead call a stored procedure in sql server. I am using continuous forms. The problem I am having is with returning to the next...
0
by: Deano | last post by:
My beforeupdate event on the main form fires when a change has been made and the record has not been saved (2 variables are used to track this). Works great but if they make a change in my...
10
by: MLH | last post by:
Would like to examine the value entered into a textbox on an A97 form during the BeforeUpdate event. The textbox may or may not have had an earlier entry in it prior to the latest value that is...
3
by: David | last post by:
Hi If I change the checked value of the checkbox by code, I can not trigger the CheckedChanged event of a checkbox control. Is there any way to implement it? Thank you very much!
6
by: lorirobn | last post by:
Hi, I have a form with a continuous subform. I am working on putting validations in for the subform's required fields. Being somewhat new to Access (or rather, an antiquated mainframe...
0
by: adolph | last post by:
Hi, I have a beforeupdate evbent that tests to see that a customer chosen before the user can enter an amount. If the customer has not been chosen yet, then I would like to popup a message...
6
by: tbrown | last post by:
I have a combobox with items like this: {one,two,three}. The selected index is 0, so "one" appears in the combobox text. When the user drops down the list, and selects "two", for example, I...
8
by: evn678 | last post by:
Hello all, I am trying to handle a scenario where a user clicks the 'X' close control on a form window border. I want to force the user to use the form's 'save' button to write the updated...
0
by: wasim jack | last post by:
sir,I want to change value of combobox of datagridview on the basis of previous combobox value of the same raw of same datagridview
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.