PC Review


Reply
Thread Tools Rate Thread

command button to copy parent data to subform field

 
 
Brian
Guest
Posts: n/a
 
      11th Feb 2009
I have a command button on my parent (continuous) form that when clicked
copies the data from a field to a field on my subform. The parent form is a
continuous form and the subform displays some detailed data for the record
with focus. When I click on the command button I take the data from a field
on the parent form and copy it to a subform field. All works fine as long as
the record has focus before the button is clicked. Here is my code for doing
so:

Private Sub Command47_Click()
Parent![frm_Project_Update_Detail 800]![Budget_Date] = Me.[Due Date]
End Sub


The problem I am having is if I click the button on a record in the parent
form that does NOT have focus yet, it writes the data from that new record
(that just got the focus) to the field in the subform prior to the subform
updating to that record which now has the focus. The end result is that the
data gets written to the wrong record in the subform. Basically the subform
doesn't have time to update to the new record before the data gets written.
Does anyone know how I can fix this?

Thanks in Advance!
Brian
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
command button to copy parent data to subform field Brian Microsoft Access Forms 0 11th Feb 2009 08:14 PM
Button in subform, inserting text string into field on Parent form Toucan Microsoft Access Forms 2 19th Oct 2008 03:18 AM
Compare Sum of Subform Field to Parent Form Field Ian Microsoft Access Forms 0 10th Aug 2008 03:51 PM
How to close the parent and all child forms together at once when click on parent window's close button X. VBLearner Microsoft VB .NET 2 25th Sep 2006 05:57 AM
Page load of the parent page called twice when a modal dialog is opened from a button click of the user control on the parent page Samy Microsoft ASP .NET 2 15th Aug 2005 04:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:22 PM.