General discussion

Locked

Access 97 Input Mask

By lucycard ·
I have a field in an Access 97 database whose inputmask is defined as:
00\->LLL\-0000\-C;0;_
The rightmost dash always appears. What I'm trying to do is not have the dash if the C is a space.
Is there a way to correct the inputmask to accomplish this?
TIA!

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by lucycard In reply to Access 97 Input Mask

Point value changed by question poster.

Collapse -

by dsa In reply to Access 97 Input Mask

You cannot have your cake and eat it too. You either remove the dash and replace with space or leave the mask alone and live with the result.

Collapse -

by lucycard In reply to Access 97 Input Mask

I'll give it a try!

Collapse -

by itmanager In reply to Access 97 Input Mask

Try this:
Private Sub Form_Current()
If IsNull(Me!ControlName) then
Me!ControlName.InputMask = "00\->LLL\-0000\-C;0;_"
Else
If Len(Me!ControlName) > 9 Then
Me!ControlName.InputMask = "00\->LLL\-0000\-C;0;_"
Else
Me!ControlName.InputMask = "00\->LLL\-0000C;0;_"
End If
End If

* I assumed the length of any values would be 9 or 10
* By Leaving the C you can always edit the field and add that last character. After Form_Current fires the Input mask will display the "-" again.

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums