473,398 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Error 2448 - But I dont see why?

Hi all,

I have been banging my head against the wall with this one for a while so I now turn to you all for a pointer.

I am currently having trouble with error 2448 “You can't assign a value to this object”.

It is driving me mad as I cant see why it wont let me assign a value.

Overview:

On the main form I have a combo box which allows the user to select which project they are on. They can then enter info into a subform within the main form. Each of the entry’s needs to be married to the selected project, I used:

If IsNull(Me.TravelDate1) Then ‘check if there is any data
Exit Sub
Else
Me.TravelProjectNo1 = NewProjectNo ‘update project No
End If

(NewProjectNo is a public string)

This is when it all goes south. If I enter data into a new record its works perfectly. If I attempt to modify info on the subsheet and update the record (needed before a print/preview) it informs me that TravelProjectNo1 cannot have a value assigned to it (error 2448). In debug, if I force it to continue, it assigns a value to the object despite what it says??

Better still if I don’t modify any data in the subform but I select a different project from the combo box and update, it updates without complaint??

Any help is most welcome as I am at a complete loss!
Nov 27 '06 #1
3 3720
NeoPa
32,556 Expert Mod 16PB
You can set it to an existing value in the list I believe.
Otherwise it will complain. Only ListBoxes have the option of allowing the operator to select an item not already in the list.
If you add a record to the underlying (bound) dataset, then you need to requery the ComboBox before accessing it.
Nov 27 '06 #2
Cheers NeoPa,

Will give that a try!
Nov 28 '06 #3
NeoPa
32,556 Expert Mod 16PB
No problem.
Hope it works for you.
Nov 29 '06 #4

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

Similar topics

6
by: jason | last post by:
I am picking up an error message on a straightforward INSERT - do I need an optimistic-type to get this working....here is is the error: Microsoft JET Database Engine error '80004005' Operation...
15
by: M P | last post by:
What does this mean? I am accessing an ASP page that queries Access Database thru fileDSN. I'm using IIS 5.0 Win2K SP4 Microsoft OLE DB Provider for ODBC Drivers error '80004005' General...
3
by: Alex Stevens | last post by:
I'd already posted this in microsoft.public.dotnet.framework.windowsforms and microsoft.public.dotnet.framework.windowsforms.controls to no avail so apologies for the cross-posting. Hi, I'm...
10
by: DataBard007 | last post by:
Hello Access Gurus: I use Win98SE and Access97. I just built a simple Access97 application which holds all contact information for my personal contacts, such as first name, last name, address,...
10
by: MLH | last post by:
Anybody know why I might be getting error #2109 during the procedure below? It does not occur on 2 desktops, but did on a laptop. The error said: "The following unexpected error occurred in Sub...
6
by: Tamir Khason | last post by:
I recieve the very strange error while compiling project: "object reference net set to the instance of the object" in line 0 !!! The first lines in this .cs are using System; using...
2
by: Phillip Galey | last post by:
I have an object called Place which contains only string properties and has the <Serializable()> flag before the class name declaration. I also have a collection object called Places, which is...
1
by: AH | last post by:
Hi, I used a dataTable to bind to datagrid. I setup code to handle the rowchanging event but whenever I change from one row to another in the datagrid, the datagrid changed to a white box with a...
5
by: bluemoon9 | last post by:
Hi all, I have a listbox which lists all the accounts, and I would like to handle error when user did not select any account in the list box but then click on "view/edit" button. The following is my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.