I do think the long pole in the tent is the records behind the tab control in the first place. Based on the description so far, the navigation controls on the form already affect all the pages in the tab control. If this is the case, then I don’t know how to change the record on pages 1 and 2, and maintain the same record on tabs 3 and 4. Wouldn’t this require a restructure of the tab control to include sub forms on each page?
Button Control on Tab-Control Pages
Collapse
X
-
I'm sorry ijared. Unless you use the correct terms we are going to struggle. You correctly refer to command buttons one moment, and then refer to them as tabs. Very confusing.
If you select a control with your cursor, you will find it's correct Selection Type in the properties window. Please ONLY use those terms.
Here are some images of forms, and those images in design view, I have indicated where to will find the correct type of control.
This is a Tab control.
This is a Page Control
In form view these are some of the form's components.
I suggest that you refer to the things at the bottom of your form as Navigation Command Buttons, and at the top of your form you have a Tab Control with four Pages on it.
Using the correct terms, I'm sure we can help
PhilComment
-
Thanks a lot. It is taking me some times to wrap my head around these names and the way you call them. On the first page I have a list box and I may have to move the name to the list box on the third page.
I will have to leave the command buttons the way they are.Last edited by ijared; Jul 16 '18, 02:29 PM. Reason: I had to express myself corectly: On the first page I have a name on the list box and I may have to move the name to the list box on the third page.Comment
-
So I now read your original question as
I have a single form with a Tab Control containing 4 Pages with list boxes on 2 of the Pages. I have navigation Command Button on the Page 1, and it controls all the Records?????. The list boxes contains different data.
I want the navigation Control Buttons to work only on Pages 1 and 2 but a second navigation Button to work on Pages 3 and 4.
How do I go about that?
So please confirm I am correct.
Please also confirm the navigation Control Buttons are for changing records, NOT for changing Pages
If so, please confirm that you want an set of navigation Control Buttons on Page 2, identical to those on Page 1.
Precisely what do you want on Pages 3 and 4?
PhilComment
-
I thought the answer I asked for was finished.
I stand by what I said from the begining and yes, the navigation Control Buttons are for changing records, NOT for changing Pages. I want an set of navigation Control Buttons on Page 2, identical to those on Page 1.
On Pages 3 and 4, I only want the record selected in list box1 is moved to list box 2.Comment
-
I don't see how this is possible without hte use of sub-forms, which you have given us no indication this is what you have.the navigation Control Buttons are for changing records
This makes absolutely no sense at all.On Pages 3 and 4, I only want the record selected in list box1 is moved to list box 2.
list boxes do not contain records--they contain lists. Additoinally, this has nothing to do with the navigation command buttons/controls on the pages we have been talking about.
Please, take some time and thoroughly explain what it is you want to do. We are willing to help.Comment
-
If I gather correctly, you want a command button that will move a selected item from one listbox to another listbox.
What's throwing everyone off is that we are trying to use the official terminology that Microsoft uses but you're taking some of the terminology and applying it elsewhere. The problem with that is we have no idea what you're referring to because we only know of one type of navigation controls. What you're referring to as navigation controls are not navigation controls. And what you're trying to do with the new set of controls has nothing to do with "navigation " in the context in which Microsoft uses the phrase navigation controls.Comment
-
ijared
You have a moving target here and that is beginning to frustrate me
How so?I thought the answer I asked for was finished.
If we've answered your question then you need to let us know so that we can move on to someone that needs our help.
... and from the beginning you have been somewhat ambiguous in your terminology by refusing to use the correct nomenclature for the control objects in question.I stand by what I said from the begining and yes, the navigation Control Buttons are for changing records, NOT for changing Pages.
At least in post #7 the image started us on the correct path and finally in Post #11 you showed us most of your form... you missed the very bottom where the form's default record navigation buttons are located.
AHH now we get to the pointI want an set of navigation Control Buttons on Page 2, identical to those on Page 1.
This is easy enough to accomplish and I have attached a database that has a very generic form that shows this.
To get the control button on the PAGE of the tab control you have to select the page not the form and then add your controls to the page.
This is a separate question altogether from your firstOn Pages 3 and 4, I only want the record selected in list box1 is moved to list box 2.
>>Next Post...<<Last edited by zmbd; Jul 17 '18, 10:46 AM.Comment
-
So that we have things straight this is how I will refer to the controls in the design view of the form
<step1>
[imgnothumb]https://bytes.com/attachment.php? attachmentid=95 53[/imgnothumb]
To get the control on the page of the tab control, first click on the page (the little tab looking thing in the tab control - in this image "page 1") of the tab control. This should highlight the page control and any objects within
<step 2>
[imgnothumb]https://bytes.com/attachment.php? attachmentid=95 54[/imgnothumb]
Now click on the command button tool and then move your mouse pointer over the area on the page you wish to add your command button (or for that fact any control) and draw in your control...
>>Take special note here, the Page area turned black when I moved the mouse over the page control after selecting the command-button tool
<step3>
[imgnothumb]https://bytes.com/attachment.php? attachmentid=96 41[/imgnothumb]
To copy and paste a set of controls from one page to another, you need to first select your controls, <ctrl><c> then click on the Page-tab (or in this image the page is already selected so I clicked on the tab control) so that it highlights as shown above, hover your mouse where you want to paste (the area should turn black (depending on your os theme setting) and the <ctrl><v>
<step4>
[imgnothumb]https://bytes.com/attachment.php? attachmentid=95 56[/imgnothumb]
<step5>
[imgnothumb]https://bytes.com/attachment.php? attachmentid=95 57[/imgnothumb]
NOTICE here that there's a different command button on Page2? on Page1 the command button is "Command8" on Page2 it's "Command3"!
<<Continued in the next post>>>Comment
-
Ran out of attachment space in the last post...
>> TAKE NOTE HERE, even though you copy and pasted - the controls are not the same, they have different names!
So in this case when you click on the command button on the form with the caption "Command9" you will get a message box; HOWEVER, you will not get that same message box on the control pasted on the "Page2" of the tab control... you will have to go into the properties for the command button on Page2 and set the code up for the event!
<step6>
[imgnothumb]https://bytes.com/attachment.php? attachmentid=96 42[/imgnothumb]
Attached is a database that I pulled the above images from and should make the rest of this very obvious to you.
I've broken my usual habit of renaming controls normally I wouldn't use the default names; however, this is only by way of an exampleComment
-
@zmbd
Brilliant illustrations, particularly Step 1.Jpg
In an question I posted a few days ago https://bytes.com/topic/access/answe...062-parts-form
I was hoping that someone could provide a definitive article on the parts of a form, and your picture is an excellent start.
I know that you said you would investigate, but even if you can't find an appropriate website, a few illustrations of that calibre would be perfect.
PhilComment
-
You've answered many questions by restating the same information over and over again...ijared
Is there a question I haven't answered yet?
At this point, read my last post(s), download the example DB, and let us know if you've figured the first part of your question out.
One more hint:
The code for Page1 and Page2 navigation buttons I'd either have in a standard module or on the form as something like:
then in your on_click events for each button on each page you would call the code...Code:Sub pg1n2_First () 'your code here 'check to see which page is active in case something is specific to that page such as a control End Sub Sub pg1n2_Back () 'your code here 'check to see which page is active in case something is specific to that page such as a control End Sub ' 'etc....
At this point either we are not explaining things in a manner that you can understand or your question was DOA when posted.Code:sub btnPg1_first_onclick() call pg1n2_first end sub sub btnPg2_first_onclick() call pg1n2_first end sub 'etc....
I'm going to send you a boiler-plate that has a lot of my standard references and tutorials please check your
Bytes.com Inbox
This way you only need the code once...Comment
Comment