Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2010
    Posts
    8

    Unanswered: control source expression changing on Forms and Reports unintentionally

    I'm hoping someone can help with this one. I've been stuck on this for weeks and have been unable to find anything by searching online.

    I have several forms and reports with text fields on them in which i enter expressions to look information up on certain forms or reports.
    Form ControlSource Example:
    =DLookUp("[Min]","qryCust","[CID] =" & [Forms]![frmFlip]![CID])
    Report ControlSource Example:
    =DLookUp("[Min]","qryCust","[CID] =" & [Reports]![rptFlip]![CID])

    Here is what is happening:
    Form ControlSource Example:
    =DLookUp("[Min]","qryCust","[CID] =" & [Forms]![Form]![CID])
    Report ControlSource Example:
    =IIf(IsNull(DLookUp("[CID]","tblCoApp","[CID] = " & [Reports]!Report!CID)),"","and " & DLookUp("[Name]","tblCoApp","[CID] = " & [Reports]![Report]![CID]))

    It appears Random but I'm sure there is some method to the madness. Access is "forgetting" the actual form or report name in the control source expression.

    My access db is 2000. Any help would be greatly appreciated!
    Thank you in advance.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    I don't understand the logic behind the mechanism you explain (it seems confusing to me) but it does not really matter.

    As far as I know, the only possibility for a property of a form or a report to be permanently modified consists in saving this form or this report after such a property was modified (willingly or not).

    In the "Other" tab of the "Properties" window for a form or a report, there is an entry for a property named "AllowDesignChanges". By default, this property is set to "All Views" (value: True). I would change this and select "Design View Only" (value: False), then see if the problem persists.
    Have a nice day!

  3. #3
    Join Date
    Sep 2010
    Posts
    8
    Thank you for your response. Unfortunately that option is already Set to Design View.

Tags for this Thread

Posting Permissions

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