If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > control source expression changing on Forms and Reports unintentionally

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-14-11, 17:40
Bmw Bmw is offline
Registered User
 
Join Date: Sep 2010
Posts: 6
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.
Reply With Quote
  #2 (permalink)  
Old 12-15-11, 05:11
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
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!
Reply With Quote
  #3 (permalink)  
Old 12-15-11, 07:18
Bmw Bmw is offline
Registered User
 
Join Date: Sep 2010
Posts: 6
Thank you for your response. Unfortunately that option is already Set to Design View.
Reply With Quote
Reply

Tags
controlsource, form, report

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On