Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2007

Tip: Looking for answers? Try searching our database.

Adding new record in tab subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
forcefield - 14 Jul 2007 09:47 GMT
Hi everyone,
I have a main form, frmMain with a tab control.. There are 2 pages on the tab
control and each page has a subform containing only several option groups
These subforms are linked to main form by Child and Master relationship.
What I would to do is when I click a button on the main form I would like
both the subforms add a new blank page of option groups  for user to check. I
was able to get a blank new record for the second  page or subform  but not
the first page or subform. Can someone please correct my code?
Thanks

Private Sub cmdNew_Click()
   On Error GoTo Err_cmdNew_Click

         Me.sfrmOne.SetFocus
         DoCmd.GoToRecord , , acNewRec
 
        Me.sfrmTwo.SetFocus
        DoCmd.GoToRecord , , acNewRec
       

Exit_cmdNew_Click:
   Exit Sub

Err_cmdNew_Click:
   MsgBox Err.Description
   Resume Exit_cmdNew_Click
End Sub
missinglinq - 14 Jul 2007 14:51 GMT
Why would you go to the trouble and aggravation of having subforms that only
hold option groups, instead of simply placing your option groups on the
tabbed pages themselves?

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

forcefield - 15 Jul 2007 09:12 GMT
Hi,
In fact I have several tab pages for different group of people but similar
sets of option groups.
So I have several tables for different group of people linked to one main
table.
To lesson the complication, I just mentioned 2 pages. If someone can correct
my code for 2 pages, I add more codes for more pages.
Thanks

>Why would you go to the trouble and aggravation of having subforms that only
>hold option groups, instead of simply placing your option groups on the
>tabbed pages themselves?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.