A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Format of SSN Field on Form



 
 
Thread Tools Display Modes
  #1  
Old March 2nd, 2010, 04:27 PM posted to microsoft.public.access.forms
Ken Hudson
external usenet poster
 
Posts: 82
Default Format of SSN Field on Form

I have a table with an pkEmpID (auto number) and txtSSN, txtLName, etc. fields.
I have a form with a combo box used to query this table. The combo box
retrieves the pkEmpID and txtSSN when the user types in the SSN. (The pkEmpID
is bound to a field in another table.)
When I type in the SSN, I want the combo box to display it as @@@-@@-@@@@.
If I set the field format to @@@-@@-@@@@ in the table, the SSN displays the
data okay on the form. But you have to type in the dashes as part of the
entry. I prefer not to have to do that.
I took the formatting off the table field and tried to set the format for
the combo box on the form to @@@-@@-@@@@, but that did not work.
Does this have something to do with the fact that the combo box is bound to
the auto-number and therefore the formatting doesn't take or is there
something else I am missing?
TIA.

--
Ken Hudson
  #2  
Old March 2nd, 2010, 06:20 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default Format of SSN Field on Form

Try formatting the SSN in a query and binding the combo box to the query.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Ken Hudson" wrote in message
...
I have a table with an pkEmpID (auto number) and txtSSN, txtLName, etc.
fields.
I have a form with a combo box used to query this table. The combo box
retrieves the pkEmpID and txtSSN when the user types in the SSN. (The
pkEmpID
is bound to a field in another table.)
When I type in the SSN, I want the combo box to display it as @@@-@@-@@@@.
If I set the field format to @@@-@@-@@@@ in the table, the SSN displays
the
data okay on the form. But you have to type in the dashes as part of the
entry. I prefer not to have to do that.
I took the formatting off the table field and tried to set the format for
the combo box on the form to @@@-@@-@@@@, but that did not work.
Does this have something to do with the fact that the combo box is bound
to
the auto-number and therefore the formatting doesn't take or is there
something else I am missing?
TIA.

--
Ken Hudson



  #3  
Old March 2nd, 2010, 09:24 PM posted to microsoft.public.access.forms
Ken Hudson
external usenet poster
 
Posts: 82
Default Format of SSN Field on Form

Hi Arvin,
Thanks for the response.
I tried that but with the Auto Expand property set to Yes, I still have to
enter the hyphens in the SSN to get a match.
Perhaps it will only work that way?

--
Ken Hudson


"Arvin Meyer [MVP]" wrote:

Try formatting the SSN in a query and binding the combo box to the query.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Ken Hudson" wrote in message
...
I have a table with an pkEmpID (auto number) and txtSSN, txtLName, etc.
fields.
I have a form with a combo box used to query this table. The combo box
retrieves the pkEmpID and txtSSN when the user types in the SSN. (The
pkEmpID
is bound to a field in another table.)
When I type in the SSN, I want the combo box to display it as @@@-@@-@@@@.
If I set the field format to @@@-@@-@@@@ in the table, the SSN displays
the
data okay on the form. But you have to type in the dashes as part of the
entry. I prefer not to have to do that.
I took the formatting off the table field and tried to set the format for
the combo box on the form to @@@-@@-@@@@, but that did not work.
Does this have something to do with the fact that the combo box is bound
to
the auto-number and therefore the formatting doesn't take or is there
something else I am missing?
TIA.

--
Ken Hudson



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.