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  

Input Mask - quick question



 
 
Thread Tools Display Modes
  #1  
Old May 20th, 2010, 03:43 PM posted to microsoft.public.access.forms
prodata
external usenet poster
 
Posts: 5
Default Input Mask - quick question

Sorry I'm just an occasional Access user but need to tweak an existing
form in a database. This has a couple of fields for holding latitude
and longitude values, which we need to store as text values in
deg:min:sec format, eg 12:34:56 .

(When I say 'store' I mean that literally. The database file is
accessed by a completely separate custom VB program that reads these
two fields as strings and expects to see two colon characters in each
field string in the appropriate places.)

I'd been hoping to use an input mask so that users don't forget to
enter the colons, which they're apt to do. In other words, so that all
the user needs to do is to enter only the digits, with the colons
effectively being entered automatically

For the input mask I've tried using 00:00:00 and then 00\:00\:00
(wondering if the colons needed to be a literal) but in neither case
do the colons seem to get stored in the relevant database fields.

Anyone able to advise please?
Ads
  #2  
Old May 20th, 2010, 04:17 PM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Input Mask - quick question

Read about the (optional) second section in the Help file (or see
http://msdn.microsoft.com/en-us/library/bb215691.aspx )

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"prodata" wrote in message
...
Sorry I'm just an occasional Access user but need to tweak an existing
form in a database. This has a couple of fields for holding latitude
and longitude values, which we need to store as text values in
deg:min:sec format, eg 12:34:56 .

(When I say 'store' I mean that literally. The database file is
accessed by a completely separate custom VB program that reads these
two fields as strings and expects to see two colon characters in each
field string in the appropriate places.)

I'd been hoping to use an input mask so that users don't forget to
enter the colons, which they're apt to do. In other words, so that all
the user needs to do is to enter only the digits, with the colons
effectively being entered automatically

For the input mask I've tried using 00:00:00 and then 00\:00\:00
(wondering if the colons needed to be a literal) but in neither case
do the colons seem to get stored in the relevant database fields.

Anyone able to advise please?



  #3  
Old May 20th, 2010, 05:20 PM posted to microsoft.public.access.forms
prodata
external usenet poster
 
Posts: 5
Default Input Mask - quick question

On May 20, 4:17*pm, "Douglas J. Steele"
wrote:
Read about the (optional) second section in the Help file (or seehttp://msdn.microsoft.com/en-us/library/bb215691.aspx)


Thanks - that suggests that simply adding a semicolon and a zero to
the end of my input mask should do the trick. But sadly it doesn't
seem to.

So, if I set the input mask to 00:00:00;0 (penultimate character is a
semicolon) then 12:34:56 is still stored just as 123456 .

Using 00\:00\:00;0 gives no improvement.

What am I missing? Does the input mask need to be in quotes? Should
there be a space in there after the semicolon, or an additional
terminating semicolon? Or what?
  #4  
Old May 20th, 2010, 05:56 PM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Input Mask - quick question

Do you have the field set to Text, not a number?

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"prodata" wrote in message
...
On May 20, 4:17 pm, "Douglas J. Steele"
wrote:
Read about the (optional) second section in the Help file (or
seehttp://msdn.microsoft.com/en-us/library/bb215691.aspx)


Thanks - that suggests that simply adding a semicolon and a zero to
the end of my input mask should do the trick. But sadly it doesn't
seem to.

So, if I set the input mask to 00:00:00;0 (penultimate character is a
semicolon) then 12:34:56 is still stored just as 123456 .

Using 00\:00\:00;0 gives no improvement.

What am I missing? Does the input mask need to be in quotes? Should
there be a space in there after the semicolon, or an additional
terminating semicolon? Or what?


  #5  
Old May 20th, 2010, 06:03 PM posted to microsoft.public.access.forms
prodata
external usenet poster
 
Posts: 5
Default Input Mask - quick question

On May 20, 5:56*pm, "Douglas J. Steele"
wrote:
Do you have the field set to Text, not a number?


Yes, definitely text.
  #6  
Old May 21st, 2010, 07:40 AM posted to microsoft.public.access.forms
prodata
external usenet poster
 
Posts: 5
Default Input Mask - quick question

No-one able to offer any further insight or suggestion? I guess it
must be a fairly obscure issue/bug?

JGD
  #7  
Old May 21st, 2010, 01:12 PM posted to microsoft.public.access.forms
prodata
external usenet poster
 
Posts: 5
Default Input Mask - quick question

OK, problem solved. I was inadvertantly setting the input mask on the
main table rather than the form. Once I set it correctly on the form
then all was OK!
 




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 06:36 PM.


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