Quick code

  • Thread starter Thread starter ladybug via AccessMonster.com
  • Start date Start date
L

ladybug via AccessMonster.com

I have a field on a form that I would like to make some type of Quick Code
for.
Example: Instead of typing out Missouri I would like the users to be able to
type MO and then space and it would populate Missouri.

This is just an example. I am not actually doing states. Are there Quick
codes like this in Access? If so, can someone help me incorporate them into
my form.
Thank you!
 
Hi,


Seems that is a standard Lookup. In Access, you can have that feature at
table design (if you take a look at the design table, at the bottom, there
is a tab labeled Lookup), but some developer will warn you that it is a
potential source of problem, since while you will store, say, MO, you will
see "Missouri" and, in two-three months, will surely type something like:
WHERE fieldName='Missouri' and get... no record, since what you should
have typed was ='MO'. Anyhow, that feature implies you have a 'translation'
table available, one field for what you typed, 'MO', and a second field for
what you have to display, 'Missouri'. Unless you can cut and paste the data
from elsewhere, and import it into an Access table, you have to fill it
yourself, and then, once done, define the lookup.


If you don't want to use a lookup, you can use a query, implying the two
tables (yours, and the translation one), Joined through their translation
field, 'MO', with a standard inner join, and use THAT QUERY, rather than the
original table, as source of your forms/reports.


Hoping it may help,
Vanderghast, Access MVP
 
ladybug said:
I have a field on a form that I would like to make some type of Quick
Code for.
Example: Instead of typing out Missouri I would like the users to be
able to type MO and then space and it would populate Missouri.

This is just an example. I am not actually doing states. Are there
Quick codes like this in Access? If so, can someone help me
incorporate them into my form.
Thank you!

If you use a ComboBox with a list of entries and set the AutoExpand property
to True then as the user types the list will jump down to those choices
matching what they have typed so far. When the entered characters have only
one match then the user can tab out and that selection will be inserted.
 
I didn't want to change the form, but it sounds like I'm going to need to.
What do I need to set so that they can use a selection from the list or enter
in a new one?

Rick said:
I have a field on a form that I would like to make some type of Quick
Code for.
[quoted text clipped - 5 lines]
incorporate them into my form.
Thank you!

If you use a ComboBox with a list of entries and set the AutoExpand property
to True then as the user types the list will jump down to those choices
matching what they have typed so far. When the entered characters have only
one match then the user can tab out and that selection will be inserted.
 
ladybug said:
I didn't want to change the form, but it sounds like I'm going to
need to. What do I need to set so that they can use a selection from
the list or enter in a new one?

Well, it;s a pretty easy change. Right-click on the TextBox then go to menu...

Format
Change To
ComboBox

Set up a table with the list of choices and then use that for the RowSource of
the ComboBox. If you leave LimitToList = No then the user can deviate from the
choices in the list if they want.
 

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

Back
Top