PC Review


Reply
Thread Tools Rate Thread

How to add record in Subform which is in another Subform

 
 
K
Guest
Posts: n/a
 
      25th May 2010
Hi all, I have Subform "SubA" on another Subform "SubB". And "SubB"
is on Form called "Main". On "SubB" I have button called "Add New
Record" and I got macro (see below) on this button's click event.

Private Sub Command1_Click()
Me.SubA.SetFocus
DoCmd.GoToRecord , , acNewRec
End Sub


When I open Form "SubB" and click button, macro works but when I open
Form "Main" and click button which is showing in "SubB" subform,
macro
don’t work. I tried below macro but I don’t work


Private Sub Command1_Click()
Forms![Main]![SubA]![SubB].SetFocus
DoCmd.GoToRecord , , acNewRec
End Sub


Please can any friend help


 
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
Double click record in subform to go to new record in Main (and subform) Jpipher@gmail.com Microsoft Access 14 3rd Feb 2007 07:06 AM
Wierd subform behaviour, subform not cycling through after updating a subform record Mikal Microsoft Access Forms 2 25th May 2006 07:15 PM
Change Subform within Subform record source proptery to paramter query sales@lunaraccents.com Microsoft Access Queries 2 30th Oct 2005 06:52 PM
code to delete a record in one subform when a record in a related subform is deleted Helen Microsoft Access Form Coding 3 3rd Apr 2005 10:01 PM
Urgent !!! - Values from Subform - #Error if no records in Subform and Only grabs first subform record Greg Microsoft Access Forms 0 17th Feb 2005 01:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:20 PM.