Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-04-2010, 11:58 PM   #1
abidshahzad4u
Registered User
 
Join Date: Aug 2009
Location: Pakistan
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
abidshahzad4u is on a distinguished road
Angry You can't assign a value to this object

Hi

I'm working on a tree view control. Tree view control is on a form and the related data is opened is a subform present at the same form.

Problem is that when I try to add new record it warns me with:
You can't assign a value to this object

I don't understand why this warning is? I click on OK and all things work fine.

I'm using a single table for populating tree view control and the subform.

abidshahzad4u is offline   Reply With Quote
Old 04-05-2010, 09:03 PM   #2
vbaInet
AWF VIP
 
Join Date: Jan 2010
Location: U.K.
Posts: 26,374
Thanks: 0
Thanked 2,423 Times in 2,389 Posts
vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all
Re: You can't assign a value to this object

Always a good idea to clear the Nodes of a tree before adding to it:

Code:
Treeview1.Nodes.Clear
Put that line just before you populate the recordset.
vbaInet is offline   Reply With Quote
Reply

Tags
tree view control

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question Help me understand the Object Browser darbid General 3 03-13-2009 08:10 AM
Microsoft Chart Object - How to assign the X-Axis to a column of data Daveyk01 Modules & VBA 1 07-03-2007 07:10 PM
"You can't assign a value to this object" error BeccaJ Forms 3 05-05-2006 05:18 AM
You can't assign a value to this object livvie Forms 2 09-07-2004 03:29 AM
You can't assign a value to this object skwilliams Forms 4 11-03-2003 08:55 AM




All times are GMT -8. The time now is 08:26 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World