Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 20th, 2007, 01:03 PM
Authorized User
Points: 135, Level: 2
Points: 135, Level: 2 Points: 135, Level: 2 Points: 135, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2007
Location: Dallas, TX, .
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?

Reply With Quote
  #2 (permalink)  
Old March 22nd, 2007, 06:29 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
  #3 (permalink)  
Old March 26th, 2007, 12:08 PM
Authorized User
Points: 135, Level: 2
Points: 135, Level: 2 Points: 135, Level: 2 Points: 135, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2007
Location: Dallas, TX, .
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.

Reply With Quote
  #4 (permalink)  
Old March 26th, 2007, 12:33 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
  #5 (permalink)  
Old March 26th, 2007, 02:26 PM
Authorized User
Points: 135, Level: 2
Points: 135, Level: 2 Points: 135, Level: 2 Points: 135, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2007
Location: Dallas, TX, .
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
Reply


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 Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:22 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.