Results 1 to 3 of 3

Thread: Need fast Help with Mask Edit Boxes

  1. #1
    Guest

    Exclamation

    Background:

    I'm using a DAO and on my form I also have a couple Masked Edit Boxes. (postal code, phone number credit card number, CC expiry date and a business phone number; yeah... its for a customer table... <images/smilies/smile.gif>

    Currently I have the code in a seperate sub routine which is called at the end if the form_Activate routine.

    When my Apply_Mask sub is fired, the application of the masks also causes the DAO to think that is going into edit mode. The tricky thing about this is that I also have a Data Class because on three forms, all the buttons are the exact same and I'm going for top marks in my final programming project for my college graduating semister... but back to the problem...

    Question:

    How can I get the masks to apply to the Mask Edit Boxes and not have the DAO think that is in edit mode?

    Please let me know as soon as possible because my projecxt is due this friday morning and I still have a lot to do...

    Thanks,

    Brad Bassingthwaite

  2. #2
    Guest

    I found my answer...

    I almost feel like I just had an orgasm after working on this one problem for the last 16 hours straight....


    Just in case anyone might be curious...

    After aplying the mask commands:

    object.mask = ""
    object.text = ""
    object.mask = ">#?# ?#?" '(canadian postal code)
    object.seltext = !Postal '(database field name)
    object.datachanged = false

    The datachanged property switches the dbeditmode to false so that your DAO thinks that the data hasn't changed at all.

    Just this one simply line makes the world of difference.

    By the way... I've only begun teaching myself VB about 2 weeks ago... that''s why I'm so happy that I found the answer.

    Best of luck to everyone!

  3. #3
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    Sh*t, wanted to say I share your feelings, but after knowing what you felt on solving your problems, I can't say that, can I?

    New knowledge for me too.

    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width