Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 20th, 2007, 01:03 PM
Authorized User
 
Join Date: Feb 2007
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default Run time error 2448

I currently have two forms, frmAccountData and frmUnderwriting. I want to update the dblPTI field on the frmUnderwriting form if the user changes the curPmtAmtNew field on the frmAccountData form with an afterupdate event. Currently, I'm getting a run time error 2448, you can't assign a value to this object. Why am I getting this error and how can I fix this?

 
Old March 22nd, 2007, 06:29 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Your subform is not updateable. Or is it? Can you make updates to your subform by entering text? If so, then perhaps you are not referring to the field properly.

How are you making the update? Are you updating the record in the table, or are you assigning a value to the text box on the subform?


mmcdonal
 
Old March 26th, 2007, 12:08 PM
Authorized User
 
Join Date: Feb 2007
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's actually two different forms. I want to update the dblPTI text box to my table.

 
Old March 26th, 2007, 12:33 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You are probably getting an error because the other form is not open, although that is usually a can't find form error.

I would go right to the table level with this one.

You could create an update query, and then for the Update to: post the name of the open form and text box, like:

Update To: [Forms]![frmAccountData].[curPmtAmtNew]

Then just run the query:

DoCmd.SetWarnings False
DoCmd.OpenQuery "qryYourUpdateQuery"
DoCmd.SetWarnings True

If that doesn't work, we can just do code. You could also open the other form Hidden, make the update and then close it.

HTH

mmcdonal
 
Old March 26th, 2007, 02:26 PM
Authorized User
 
Join Date: Feb 2007
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks! I'll try both of these. I appriciate your help.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
run-time error(s) Chacko C++ Programming 0 March 4th, 2007 02:28 PM
Error 2448 surfingeurope81 Access VBA 3 April 12th, 2006 11:25 PM
RUN-TIME ERROR compcad Beginning VB 6 2 May 21st, 2004 02:01 AM
error 2448: esj28 Access 1 April 20th, 2004 11:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.