PC Review


Reply
Thread Tools Rate Thread

Adding a new record to a subform

 
 
Jess
Guest
Posts: n/a
 
      21st Sep 2009
I have a main form which contains a subform called subform1. Subform1
contains another subform called subform2. The subforms container names are
subformcontainer1 and subformcontainer2 respectively.

How do I add a new record to subform2 if I am on subform1 with the docmd
command?

Thanks

 
Reply With Quote
 
 
 
 
Jack Leach
Guest
Posts: n/a
 
      21st Sep 2009
I believe you need to set the focus to the subform2 control (container) first:

Me.subformcontainer2.SetFocus
DoCmd.GotoRecord, , acNewRec

hth

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)



"Jess" wrote:

> I have a main form which contains a subform called subform1. Subform1
> contains another subform called subform2. The subforms container names are
> subformcontainer1 and subformcontainer2 respectively.
>
> How do I add a new record to subform2 if I am on subform1 with the docmd
> command?
>
> Thanks
>

 
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
adding a new record at subform should update an existing record (not create new record) Mark Kubicki Microsoft Access Form Coding 1 16th Jan 2009 08:34 AM
Adding Record to Subform =?Utf-8?B?TXVycmF5?= Microsoft Access VBA Modules 2 28th Jun 2007 04:26 AM
How does one protect against subform adding record before main form has record? Chips Microsoft Access Forms 3 2nd May 2004 04:19 PM
form / subform - problem adding new record! - can't save main record Bob Microsoft Access Forms 2 7th Oct 2003 06:19 PM
Stop adding record in subform after record count = 1 Charlie Microsoft Access Forms 0 31st Jul 2003 11:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:04 AM.