Results 1 to 2 of 2
  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Question Type mismatch

    I have a variable that is assigned a value from one of my subforms. It is a percent. In the subform the text box that calculates the value is formatted for percent. When I assign the value to my variable I get the "Type mismatch" error. I am completely stumped. Any tips as to where I can look? I set up my variable the following ways and neither worked



    Code:
    dim varPctColl as double   'Tried this way, did not work
    dim varPctColl                 'Also tried this way, did not work
     
    varPctColl = Form_SfrmCollections.txtPrctBal.value

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try:
    varPctColl = Val(SfrmCollections.txtPrctBal)

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

Similar Threads

  1. data type mismatch
    By jgelpi16 in forum Programming
    Replies: 5
    Last Post: 08-02-2010, 04:15 PM
  2. Type mismatch in expression /Query
    By Brian62 in forum Queries
    Replies: 4
    Last Post: 04-22-2010, 10:00 AM
  3. mismatch type compare help needed
    By techexpressinc in forum Queries
    Replies: 3
    Last Post: 02-23-2010, 03:27 PM
  4. Type Mismatch - HELP!
    By jgelpi in forum Programming
    Replies: 3
    Last Post: 07-17-2009, 03:53 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