Results 1 to 4 of 4
  1. #1
    agiuga is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2017
    Posts
    7

    Type Mismatch on a form

    I have a text field on a form which gets its integer value using a DLookup to a query expression. When I create a macro to test if this is greater than 20 I get a type mismatch error.
    I have set the format of the text field to general number and tried CInt function. Here I get a condition of False even when it should be true. If I use If [Forms]![frmMain]![txtAMFull] Is Not Null then that works. The macro builder also insists on me using Forms!frmMain even though the field is on the main form. Driving me mad.

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,399
    do you have a question? or just letting off steam

  3. #3
    agiuga is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2017
    Posts
    7
    OK, Perhaps I should have added... Can anyone help with this problem? As an update the macro works adding it to the exit event or a button. So I am happy with that.

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,399
    some code you are using would be helpful, plus a description of tables and other objects (queries, forms etc)

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

Similar Threads

  1. Type mismatch error in a form
    By B66 in forum Forms
    Replies: 29
    Last Post: 08-29-2016, 02:41 PM
  2. Type 13 (Type Mismatch) error
    By sdel_nevo in forum Programming
    Replies: 5
    Last Post: 01-22-2016, 10:01 AM
  3. Replies: 2
    Last Post: 11-19-2012, 03:23 AM
  4. Login form type mismatch
    By rafal in forum Access
    Replies: 11
    Last Post: 12-24-2010, 01:49 PM
  5. Replies: 4
    Last Post: 05-16-2009, 09:17 PM

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