By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,822 Members | 1,042 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,822 IT Pros & Developers. It's quick & easy.

Referencing Unbound Controls in a Query - Ceased Functioning

P: 2
For some reason referencing an unbound control on an active form from a query has ceased to work correctly. While other previously existing references to unbound controls in the same form seem to work fine new ones just return null or if referencing a combo box some random character (usually a box). In fact any subsequent queries created that reference controls on active forms don't seem to work properly. What could be causing this problem? Has the database become corrupted?
Jun 11 '07 #1
Share this Question
Share on Google+
2 Replies

MSeda
Expert 100+
P: 159
Are you getting an error message like "the form method is unavailable?"
or just the queries aren't working? Maybe you can post the SQL from your query as well as info on the form, what type of controls are being referenced by the query etc...
Jun 11 '07 #2

P: 2
Are you getting an error message like "the form method is unavailable?"
or just the queries aren't working? Maybe you can post the SQL from your query as well as info on the form, what type of controls are being referenced by the query etc...
No problems with the query running and no error messages given except those calculated fields on the report that result from the null generated in a query where the control clearly has a value (verified in the immediate screen). The other unbound controls on the form such as [Forms]![frmTaskingOrderGenerator]![dtEventHorizonEnd] (date fields) work fine but any subsequently added ones such as [Forms]![frmTaskingOrderGenerator]![chkIncludeAdvance] (checkbox) where I would expect to get a boolean result I get a null (the checkbox is not triple-state and has a default value of -1). I created some subsequent test queries that reference unbound controls in other forms and none of them work either. I have compacted and repaired the database and done a detect and repair on Access itself. Both completed without issue.

Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT qryOrganizations.lngCommandID, qryOrganizations.txtCommandName, qryOrganizations.bytCommandCOCLevel, qryOrganizations.lngOrganizationID, qryOrganizations.bytOrgCOCLevel, qryOrganizations.txtOrganizationName, qryOrganizations.txtOrganizationShortName, qryCOCLevels.txtCOCLevelDesignation AS txtOrgCOCLevel, Choose([Forms]![frmTaskingOrderGenerator]![frameEventHorizon],DateAdd([txtIntervalVBCode],-[Forms]![frmTaskingOrderGenerator]![intEventHorizonInterval],Date()),[Forms]![frmTaskingOrderGenerator]![dtEventHorizonStart],Null) AS dtSelectionStart, Choose([Forms]![frmTaskingOrderGenerator]![frameEventHorizon],DateAdd([txtIntervalVBCode],[Forms]![frmTaskingOrderGenerator]![intEventHorizonInterval],Date()),[Forms]![frmTaskingOrderGenerator]![dtEventHorizonEnd],Null) AS dtSelectionEnd, [Forms]![frmTaskingOrderGenerator]![chkIncludeAdvance] AS bolIncludeAdvance
  3. FROM frmqryEventHorizon_TaskingOrder, qryOrganizations INNER JOIN qryCOCLevels ON qryOrganizations.bytOrgCOCLevel = qryCOCLevels.bytCOCLevel
  4. WHERE (((qryOrganizations.lngOrganizationID)=[Forms]![frmTaskingOrderGenerator]![comboOrganizationSelect]));
  5.  
  6.  
Jun 12 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.