Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    139

    Unanswered: Expression Error

    Hello;

    Does anyone have any thoughts or suggestions on what might be the cause of the following error I get on launch of a form?

    “This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables.”

    I have located the offending control on the form. When I delete the control, the error goes away. However, the same control properties are in use on another form (not open at the same time) and work fine. I have no code or macros associated with the offending control. Short of deleting the control nothing I have tried seems to affect the error.

    Thanks...
    Larry

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    This can sometimes happen when you have controls named the same as VBA keywords. Date for example it a VBA keyword. Make sure none of your controls are named the same as VBA keywords or at the very least distinquish the control name. For example Me.Date or Me![Date].

    Try going into a Code module and doing a Compile. Select the Debug menu item then Compile yourdatabaseName. This may show you where the error exists. Without being able to see the code that is causing the error, it's very difficult to
    repair the situation.

    .
    Environment:
    Self Taught In ALL Environments.....And It Shows!


  3. #3
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    139
    Quote Originally Posted by CyberLynx
    This can sometimes happen when you have controls named the same as VBA keywords. Date for example it a VBA keyword. Make sure none of your controls are named the same as VBA keywords or at the very least distinquish the control name. For example Me.Date or Me![Date].

    Try going into a Code module and doing a Compile. Select the Debug menu item then Compile yourdatabaseName. This may show you where the error exists. Without being able to see the code that is causing the error, it's very difficult to
    repair the situation.

    .
    Thanks for the reply. Either I didn't do the Compile right, or there were no errors returned. Although I don't know exactly what I would be looking for, having never done that procedure before. It didn't give me an option to type in a database name, there was a name already in the Compile option, although it was the wrong name for the database. It was the name of the database in the Database Properties window, not the actual file name.
    Regarding the unique name, I beleive it has one (CustomerAccount#). Also, I think it bears mentioning again, the same control works just fine on another form. Control properties are exactly the same. Its weird, nothing except deleting it so far has seemed to work. I have been playing with this thing for hours now. After I type this I am going to start the form from scratch using a form wizard, using the same tables and see if that changes anything.

    Thanks again...
    Larry

  4. #4
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    139
    Quote Originally Posted by Larryg
    Thanks for the reply. Either I didn't do the Compile right, or there were no errors returned. Although I don't know exactly what I would be looking for, having never done that procedure before. It didn't give me an option to type in a database name, there was a name already in the Compile option, although it was the wrong name for the database. It was the name of the database in the Database Properties window, not the actual file name.
    Regarding the unique name, I beleive it has one (CustomerAccount#). Also, I think it bears mentioning again, the same control works just fine on another form. Control properties are exactly the same. Its weird, nothing except deleting it so far has seemed to work. I have been playing with this thing for hours now. After I type this I am going to start the form from scratch using a form wizard, using the same tables and see if that changes anything.

    Thanks again...
    Larry
    OK... creating a new form worked. No more errors. I would sure like to know what the problem was, so I can fix it if it happens again. Not knowing what I did, I am likely going to do it again. At least I can move on now. Looking back I think creating a new form would have saved me a lot of wasted time trying to overcome the problem on the original form.

    Thanks again...
    Larry

Posting Permissions

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