If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Tabs Button question
Access 2003
I have a TabControl added to a form on a page (Page3) of that tab control I have added a form There is also a buttom on the page (but not on the form) I want that button to add a new record to the form This is what I have tried but I keep getting an error: Me!Page3.frmAdminInvestorType.InvestorType.SetFocu s DoCmd.GoToRecord , , acNewRec What am I doing wrong? Dave |
#2
|
|||
|
|||
Tabs Button question
Dave wrote:
Access 2003 I have a TabControl added to a form on a page (Page3) of that tab control I have added a form There is also a buttom on the page (but not on the form) I want that button to add a new record to the form This is what I have tried but I keep getting an error: Me!Page3.frmAdminInvestorType.InvestorType.SetFocu s DoCmd.GoToRecord , , acNewRec What am I doing wrong? Dave Neither the TabControl nor the TabPage is used to reference the subform. Just refer to it as you would if there were no TabControl on your form. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#3
|
|||
|
|||
Tabs Button question
Rick,
Thanks - but I still seem to be having trouble getting focus back on the subform. I guess the easiest thing to do would be just put the damn button on the subform "Rick Brandt" wrote in message t... Dave wrote: Access 2003 I have a TabControl added to a form on a page (Page3) of that tab control I have added a form There is also a buttom on the page (but not on the form) I want that button to add a new record to the form This is what I have tried but I keep getting an error: Me!Page3.frmAdminInvestorType.InvestorType.SetFocu s DoCmd.GoToRecord , , acNewRec What am I doing wrong? Dave Neither the TabControl nor the TabPage is used to reference the subform. Just refer to it as you would if there were no TabControl on your form. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#4
|
|||
|
|||
Tabs Button question
Dave wrote:
Rick, Thanks - but I still seem to be having trouble getting focus back on the subform. I guess the easiest thing to do would be just put the damn button on the subform Is frmAdminInvestorType the name of the form or the name of the subform control hosting the form? Often the nmaes are the same, but that is not guaranteed. It is also usually the case that you need two lines. One to set focus first to the subform, followed by a line that sets focus to the desired control on the subform. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#5
|
|||
|
|||
Tabs Button question
It is both.
This seems to work but gives me a "Object Required" error Me!frmAdminInvestorType.SetFocus DoCmd.GoToRecord , , acNewRec InvestorType.SetFocus "Rick Brandt" wrote in message t... Dave wrote: Rick, Thanks - but I still seem to be having trouble getting focus back on the subform. I guess the easiest thing to do would be just put the damn button on the subform Is frmAdminInvestorType the name of the form or the name of the subform control hosting the form? Often the nmaes are the same, but that is not guaranteed. It is also usually the case that you need two lines. One to set focus first to the subform, followed by a line that sets focus to the desired control on the subform. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#6
|
|||
|
|||
Tabs Button question
Dave wrote:
It is both. This seems to work but gives me a "Object Required" error Me!frmAdminInvestorType.SetFocus DoCmd.GoToRecord , , acNewRec InvestorType.SetFocus Me!frmAdminInvestorType.SetFocus Me!frmAdminInvestorType.InvestorType.SetFocus DoCmd.GoToRecord , , acNewRec -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#7
|
|||
|
|||
Tabs Button question
Thanks Rick,
still getting error "Object doesn't support this property or Method" Dave "Rick Brandt" wrote in message t... Dave wrote: It is both. This seems to work but gives me a "Object Required" error Me!frmAdminInvestorType.SetFocus DoCmd.GoToRecord , , acNewRec InvestorType.SetFocus Me!frmAdminInvestorType.SetFocus Me!frmAdminInvestorType.InvestorType.SetFocus DoCmd.GoToRecord , , acNewRec -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#8
|
|||
|
|||
Tabs Button question
Dave wrote:
Thanks Rick, still getting error "Object doesn't support this property or Method" Which line? -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#9
|
|||
|
|||
Tabs Button question
Well the error did not invoke the "debugger" so I did not know which line.
So I decided just to comment out one line at a time. To my surprise commenting out this line: Me!frmAdminInvestorType.InvestorType.SetFocus eliminated the error AND it seems to work I think I am good now Thanks much Dave "Rick Brandt" wrote in message t... Dave wrote: Thanks Rick, still getting error "Object doesn't support this property or Method" Which line? -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
Thread Tools | |
Display Modes | |
|
|