Results 1 to 5 of 5
  1. #1
    msasan1367 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    60

    change type mismatch error

    Hi
    I have two textbox and I want enter only numbers on them
    validation rule for first texbox is >0
    validation rule for second texbox is >5
    when I enter a letter on first or second textbox, it shows 'type mismatch' error


    how to change this error?
    thanks

    Click image for larger version. 

Name:	img.JPG 
Views:	3 
Size:	30.7 KB 
ID:	13047

    dba.zip
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    You can set the Format property to General Number and will get a different message: The value you entered isn't valid for this field.

    Otherwise, will have to use code (VBA or macro) to validate entry.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    msasan1367 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    60
    but when textbox attach to table, I can't change format property. what should I do?
    dba-edit.mdb

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    You want to enter numbers into textboxes but the fields are set as text type. What is the nature of this number data - what does it represent?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    msasan1367 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    60
    thanks, I convert it to number and my problem is solved

Please reply to this thread with any new information or opinions.

Similar Threads

  1. type mismatch error 13
    By Compufreak in forum Access
    Replies: 3
    Last Post: 08-10-2012, 03:48 AM
  2. Run-time error '13': Type mismatch
    By uronmapu in forum Access
    Replies: 2
    Last Post: 07-10-2012, 07:59 PM
  3. Replies: 1
    Last Post: 05-11-2012, 10:59 AM
  4. Error#13 Type Mismatch
    By Nistin27 in forum Access
    Replies: 8
    Last Post: 08-17-2011, 04:15 PM
  5. type mismatch error?
    By hlcarlin in forum Programming
    Replies: 1
    Last Post: 07-07-2011, 08:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums