Command buttons on a tabed page form

message from =?Utf-8?B?TWljaGVsbGU=?= on 21 May 2004
How do you create a "Add New" command button on a form that has a tabed page? What I would like it to do is go to the first field on the first page.

Can anyone help?
 
tina replied to =?Utf-8?B?TWljaGVsbGU=?= on 21 May 2004
if the field you want to go to, and the command button, are both on the main
form - rather than one of them on a subform - just add a procedure to the
command button's OnClick event, as

Private Sub CommandButtonName_Click()

DoCmd.RunCommand acCmdRecordsGoToNew
Me!ControlName.SetFocus

End Sub

substitute the correct command button name and control name, of course.

hth

"Michelle" <hvrhsprincipal@hotmail.com> wrote in message
news:65D16B52-A682-44AB-916A-A02795065151@microsoft.com...
page? What I would like it to do is go to the first field on the first
page.
 
=?Utf-8?B?TWljaGVsbGU=?= replied to tina on 21 May 2004
When I run this command it gives me an run-time error 2046
"The command or action RecordsGoToNew isn't available now.
Why do I get this message?
 
tina replied to =?Utf-8?B?TWljaGVsbGU=?= on 21 May 2004
since you called the button "Add New" , i assumed you wanted to go to a new
record, then to the first field in the record. is that *not* the case? is
your form bound to a table or updateable query? is the form's AllowAdditions
property set to No? are you opening the form as Read Only?

"Michelle" <anonymous@discussions.microsoft.com> wrote in message
news:C6A7BD54-0358-4551-9A8A-C471ACE1DCE6@microsoft.com...
 
=?Utf-8?B?TWljaGVsbGU=?= replied to tina on 24 May 2004
To answer your questions. My form is setup with tabs instead of page breaks (5 tabs). I have the s.s.#, first name and last name fields above the tabs, so they show up each time you go to a different tab. The form is made from a query that contains a couple of tables. Each table is updated each time a new employee is entered. What I would like it to do is go back to the first field (s.s.#) and the first tabed page. So, if I'm on the third tabed page it should go back to the first tabed page and go to the s.s.# field above the tab. Do you have any ideas?
 
tina replied to =?Utf-8?B?TWljaGVsbGU=?= on 24 May 2004
if the form's underlying query has multiple tables, are you sure the
recordset is updateable? to test it, open the query itself, and try to add a
record. if you can't, then the problem is the query not the form, and you'll
have to re-think your data entry approach.

hth

"Michelle" <anonymous@discussions.microsoft.com> wrote in message
news:E7CF48BB-74DF-43A3-9DC5-E69019850C2A@microsoft.com...
breaks (5 tabs). I have the s.s.#, first name and last name fields above
the tabs, so they show up each time you go to a different tab. The form is
made from a query that contains a couple of tables. Each table is updated
each time a new employee is entered. What I would like it to do is go back
to the first field (s.s.#) and the first tabed page. So, if I'm on the
third tabed page it should go back to the first tabed page and go to the
s.s.# field above the tab. Do you have any ideas?
 
r0adhog replied to =?Utf-8?B?TWljaGVsbGU=?= on 21 May 2004
me.tab_name.setfocus

rh

"Michelle" <hvrhsprincipal@hotmail.com> wrote in message
news:65D16B52-A682-44AB-916A-A02795065151@microsoft.com...
page? What I would like it to do is go to the first field on the first
page.
 

Archived message: Command buttons on a tabed page form (Microsoft Access Database)