input box not preserved in combobox and MS Access did this on purpose

S

sargum

Hello,

I posted a week or so ago but have not had much luck.

I found the following from MS Access Help Menu (see below) and need a
workaround. It explains why I can't keep the input mask in my drop
down list but I still need a workaround.
-------------------
Input Mask:
Note Only characters that you type directly in a control or combo box
are affected by the input mask. Microsoft Access ignores any input
masks when you import data, run an action query, or enter characters in
a control by setting the control's Text property in Visual Basic or by
using the SetValue action in a macro.
-----------------------
This is my original post:
I am using Access 2002. I have a combobox in a form that allows one to

find a record in the form by selecting a value from a list.


The combox list is generated from a table called "Wafer Info". The
field is called "Wafer Name" and the format property is text. The
field in the table carries an input mask. It is
"NM-"00"W#"00"(CCF"000")" I put in the input max into the input mask
property of the combox box as well.


When I click on the drop down list, I just see a list of numbers
0000000 instead of NM00W00CCF000. However, when I click 0000000, it
changes the display in teh combo box to the correct label of
NM00W00CCF000, but only does so after I click it. This will be
confusing to my users. They need to see the list with the input mask
applied; they will not be able to easily deduce that 0000000 is
NM00W00CCF000.


Thank you for your help!
 
J

Jeff Boyce

A combo box can be based on more than one column in its underlying source
query. If the bound column (the ID field is a great choice) is first, and
has a column width > 0, that's what will be seen (and it sounds like that's
what you are seeing).

Instead, try keeping the ID field first, but setting the column width to 0
for that column. Keep it as the bound column. Include the [Wafer Name]
field, second, and set its column width to something appropriate.

Now when the combo box is dropped down, the [Wafer Name] will show, but the
ID field will be saved.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

sargum

Hello,

Thx for the response. I do have my bound column as column 1 and being
an ID field. My second column is the "Wafer Name" field that I am
having trouble with it retaining the input mask. How can I work around
this problem given that ACCESS tells us that input masks are not
preserved for comboboxes derived from lookup queries?

S

Jeff said:
A combo box can be based on more than one column in its underlying source
query. If the bound column (the ID field is a great choice) is first, and
has a column width > 0, that's what will be seen (and it sounds like that's
what you are seeing).

Instead, try keeping the ID field first, but setting the column width to 0
for that column. Keep it as the bound column. Include the [Wafer Name]
field, second, and set its column width to something appropriate.

Now when the combo box is dropped down, the [Wafer Name] will show, but the
ID field will be saved.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Hello,

I posted a week or so ago but have not had much luck.

I found the following from MS Access Help Menu (see below) and need a
workaround. It explains why I can't keep the input mask in my drop
down list but I still need a workaround.
-------------------
Input Mask:
Note Only characters that you type directly in a control or combo box
are affected by the input mask. Microsoft Access ignores any input
masks when you import data, run an action query, or enter characters in
a control by setting the control's Text property in Visual Basic or by
using the SetValue action in a macro.
-----------------------
This is my original post:
I am using Access 2002. I have a combobox in a form that allows one to

find a record in the form by selecting a value from a list.


The combox list is generated from a table called "Wafer Info". The
field is called "Wafer Name" and the format property is text. The
field in the table carries an input mask. It is
"NM-"00"W#"00"(CCF"000")" I put in the input max into the input mask
property of the combox box as well.


When I click on the drop down list, I just see a list of numbers
0000000 instead of NM00W00CCF000. However, when I click 0000000, it
changes the display in teh combo box to the correct label of
NM00W00CCF000, but only does so after I click it. This will be
confusing to my users. They need to see the list with the input mask
applied; they will not be able to easily deduce that 0000000 is
NM00W00CCF000.


Thank you for your help!
 
S

sargum

Hello,

Thx for the response. I do have my bound column as column 1 and being
an ID field. My second column is the "Wafer Name" field that I am
having trouble with it retaining the input mask. How can I work around
this problem given that ACCESS tells us that input masks are not
preserved for comboboxes derived from lookup queries?

S

Jeff said:
A combo box can be based on more than one column in its underlying source
query. If the bound column (the ID field is a great choice) is first, and
has a column width > 0, that's what will be seen (and it sounds like that's
what you are seeing).

Instead, try keeping the ID field first, but setting the column width to 0
for that column. Keep it as the bound column. Include the [Wafer Name]
field, second, and set its column width to something appropriate.

Now when the combo box is dropped down, the [Wafer Name] will show, but the
ID field will be saved.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Hello,

I posted a week or so ago but have not had much luck.

I found the following from MS Access Help Menu (see below) and need a
workaround. It explains why I can't keep the input mask in my drop
down list but I still need a workaround.
-------------------
Input Mask:
Note Only characters that you type directly in a control or combo box
are affected by the input mask. Microsoft Access ignores any input
masks when you import data, run an action query, or enter characters in
a control by setting the control's Text property in Visual Basic or by
using the SetValue action in a macro.
-----------------------
This is my original post:
I am using Access 2002. I have a combobox in a form that allows one to

find a record in the form by selecting a value from a list.


The combox list is generated from a table called "Wafer Info". The
field is called "Wafer Name" and the format property is text. The
field in the table carries an input mask. It is
"NM-"00"W#"00"(CCF"000")" I put in the input max into the input mask
property of the combox box as well.


When I click on the drop down list, I just see a list of numbers
0000000 instead of NM00W00CCF000. However, when I click 0000000, it
changes the display in teh combo box to the correct label of
NM00W00CCF000, but only does so after I click it. This will be
confusing to my users. They need to see the list with the input mask
applied; they will not be able to easily deduce that 0000000 is
NM00W00CCF000.


Thank you for your help!
 
S

sargum

Hi,

Problem Solved. I figured out a work-around. I hope this helps
somebody else.

1)First of, I had to make sure that I stored the data "with the symbols
in the mask" in the Input Mask wizard for my [Wafer Name] field. I had
to go back into my data and retype in all the data again to incorporate
this new property. (I had to essentially retrace the data to take on
the new property...if you don't do this, it will not apply the new
property.)

2)I created a completely separte table called [Wafer Name - Preserve
Input Mask] with a field called [Wafer_Name] which would store
the [Wafer Name] from the other table...(I did this by creating an
append query...INSERT INTO [Wafer Name - Preserve Input Mask] (
Wafer_Name, [SELECT [Wafer Info].[Wafer Name] FROM [Wafer Info];

3)Then, I created a Delete Query that would delete the old records from
[Wafer Name - Preserve Input Mask] so we don't keep duplicating records
DELETE [Wafer Name - Preserve Input Mask].Wafer_Name
FROM [Wafer Name - Preserve Input Mask]
WHERE ((([Wafer Name - Preserve Input Mask].Wafer_Name) Is Not Null));

4)Last, I created a combobox using the combox wizard in my form and
pulled the data from the table labeled [Wafer Name - Preserve Input
Mask]. Voila, the Input mask in this combo box was preserved!! I
could select my Wafer Name (with applied Input Mask) and get to the
record I want.

As an aside, I made a macro that runs the append and delete query (see
#2, #3) above
whenever the user opens the form.

S

Hello,

Thx for the response. I do have my bound column as column 1 and being
an ID field. My second column is the "Wafer Name" field that I am
having trouble with it retaining the input mask. How can I work around
this problem given that ACCESS tells us that input masks are not
preserved for comboboxes derived from lookup queries?

S

Jeff said:
A combo box can be based on more than one column in its underlying source
query. If the bound column (the ID field is a great choice) is first, and
has a column width > 0, that's what will be seen (and it sounds like that's
what you are seeing).

Instead, try keeping the ID field first, but setting the column width to 0
for that column. Keep it as the bound column. Include the [Wafer Name]
field, second, and set its column width to something appropriate.

Now when the combo box is dropped down, the [Wafer Name] will show, but the
ID field will be saved.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Hello,

I posted a week or so ago but have not had much luck.

I found the following from MS Access Help Menu (see below) and need a
workaround. It explains why I can't keep the input mask in my drop
down list but I still need a workaround.
-------------------
Input Mask:
Note Only characters that you type directly in a control or combo box
are affected by the input mask. Microsoft Access ignores any input
masks when you import data, run an action query, or enter characters in
a control by setting the control's Text property in Visual Basic or by
using the SetValue action in a macro.
-----------------------
This is my original post:
I am using Access 2002. I have a combobox in a form that allows one to

find a record in the form by selecting a value from a list.


The combox list is generated from a table called "Wafer Info". The
field is called "Wafer Name" and the format property is text. The
field in the table carries an input mask. It is
"NM-"00"W#"00"(CCF"000")" I put in the input max into the input mask
property of the combox box as well.


When I click on the drop down list, I just see a list of numbers
0000000 instead of NM00W00CCF000. However, when I click 0000000, it
changes the display in teh combo box to the correct label of
NM00W00CCF000, but only does so after I click it. This will be
confusing to my users. They need to see the list with the input mask
applied; they will not be able to easily deduce that 0000000 is
NM00W00CCF000.


Thank you for your help!
 

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

Top