SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Non-Member XX7509's Avatar
    Join Date
    Feb 2003
    Location
    Antarctica
    Posts
    568
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Calling An Access Input Mask

    Hey! I am setting up my database now. Almost every field I have in my tables requires some type of input mask. I use the input mask feature that is built into access. I am building my application with ado.net/vb.net. Is there some way via code that I can call the input masks to my dialog so that I don't have to reset them all in my software as well? For the most part I am not using and data controls, I perfer to do all of my database communication code manually, it gives me more control..

    for example, let's say I have a telephone field, named fldTelephone with an input mask of (000) 000-0000. I relaize I can use the mask edit control to control the input mask, and I may decide to use them instead of regular text boxes, but instead of manually resetting the input mask for all of my fields during design time can I pull them the from db?

    like

    MaskEdit1.Mask = rsDatabase!fldTelephone.InputMask ??

    This would also make it easier for me to upgrade my databases in the future.

    Any help? Thanks!

  2. #2
    Non-Member XX7509's Avatar
    Join Date
    Feb 2003
    Location
    Antarctica
    Posts
    568
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    P.S. I would also like to be able to load the descriptions that I place in the access database.

    like a field of SSN would have a description of "Enter the employees social security number, using the 000-00-0000 format."

    I would like to load it like

    Lets say focus is set to the SSN text box, this would happen

    lblDesc.Text = txtSSN.DataSource.FieldName.Description

    If this can't be done (which I'm sure it can, I just don't know how) then I can always try putting the description in the Tag property, I just would perfer not to have millions of additional lines of text compiled into my exe, I'd rather have them someplace else, and I'm not even sure I want them all in the database.

    lblDesc.Text = txtSSN.Tag


Bookmarks

Posting Permissions

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