473,387 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Horizontal Navigation Access2013, Link main form to subform text

2
As simple as that, appreciate, really if anyone can write the VBA code please, I have the home page, horizontal navigation from which includes many navigation buttons, under NavigationButton7 I have employeesfrm, and I need to navigate Next or previous while I am in the home form , the ID embedded within the employeesFrm, so the VBA code when on unload of the employeesfrm , (not on the home form), is not giving the right ID while I am on the home form. please support..
I have tried Froms!home!navigationSubform!ID , but this will give error cause any ID within any other NavigationButton8 or 9 will give another result, and I am not interested to know the ID of the other forms in other buttons. my concern is just to have a link between the ID within the employeesfrm and the Home form text.

noting is working from the below
Expand|Select|Wrap|Line Numbers
  1. Dim MyIDS As Integer
  2.  
  3. MyIDS = Me.ID ' this is giving only the first ID number all the time.
  4.  
  5. MyIDS = Forms![Home]![NavigationSubform].[Form]![employeesfrm]![ID] ' this is giving error.
  6. MyIDS = Forms![Home]![NavigationSubform]![Navigationform]![studentsfrm]![ID] ' this is giving error.
  7.  

MyIDS = Forms![Home]![NavigationSubform].Form![ID] ' this one works but if I am on another Navigation button, lets say 8 not 7, I am not interested in the number...

if anyone wonders why I want this number, I need it for my bookmark, it works fine if I am directly on the employeesfrm, but not on the home form,
thx a lot

Attached Images
File Type: jpg Capture.jpg (43.3 KB, 382 views)
Dec 30 '16 #1

✓ answered by zmbd

Hello Zeee :)
I have a serious love-hate relationship with the Access2013 and newer Navigation-Control - LOVE the layout design concept and hate some of the quirks

First, please read thru my post here:
https://bytes.com/topic/access/answe...ms#post3760995
I go into a great deal of detail here about this type of control and once you read it you will understand why what you are doing is not working as anticipated.

IN BRIEF
Each time you click on the NavigationControlCommandButton (NCCB),
these are not tabs, the subform linked to that button is newly reloaded.

What you have is:
+ One Parent Form
+ One Subform control which all subforms are loaded into when a NCCB is triggered.
+ A whole lot of NCCB, potentially grouped in two or more layers (tiers) and not only can a First-Tier Button (FTB) have several second-tier buttons grouped to it, the FTB can have its own subform assigned to it as can each of the sub-tier NCCB! Each time you click on one of the NCCB any associated group of sub-tier buttons is shown and the associated subform is reloaded from scratch!.

To pass information between the forms when triggering a NCCB to navigate thru your database; you need to store the desired value using one of the following options, the best option depends on your intent:
Control on the main form
Use the browse to method
TempVars collection

- I don't usually use the control on the Main form for this.
- I do use the Browse To method quite often
- I have used the TempVars collection for things I need to keep for the duration of the active session or a multistep user interaction

1 1086
zmbd
5,501 Expert Mod 4TB
Hello Zeee :)
I have a serious love-hate relationship with the Access2013 and newer Navigation-Control - LOVE the layout design concept and hate some of the quirks

First, please read thru my post here:
https://bytes.com/topic/access/answe...ms#post3760995
I go into a great deal of detail here about this type of control and once you read it you will understand why what you are doing is not working as anticipated.

IN BRIEF
Each time you click on the NavigationControlCommandButton (NCCB),
these are not tabs, the subform linked to that button is newly reloaded.

What you have is:
+ One Parent Form
+ One Subform control which all subforms are loaded into when a NCCB is triggered.
+ A whole lot of NCCB, potentially grouped in two or more layers (tiers) and not only can a First-Tier Button (FTB) have several second-tier buttons grouped to it, the FTB can have its own subform assigned to it as can each of the sub-tier NCCB! Each time you click on one of the NCCB any associated group of sub-tier buttons is shown and the associated subform is reloaded from scratch!.

To pass information between the forms when triggering a NCCB to navigate thru your database; you need to store the desired value using one of the following options, the best option depends on your intent:
Control on the main form
Use the browse to method
TempVars collection

- I don't usually use the control on the Main form for this.
- I do use the Browse To method quite often
- I have used the TempVars collection for things I need to keep for the duration of the active session or a multistep user interaction
Jan 22 '17 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bill Strass | last post by:
Problem: Access main form/subform as front end to SQL Server backend. Add/edit via subforms work fine. Not so with main form. Set up a master-detail form-subform using two views linked from SQL...
0
by: Deano | last post by:
I have a main/subform arrangement which works well. The main form's parent records are about employees. The subform calculates their salary. I have now decided that the user can enter some...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
30
by: Shannan Casteel via AccessMonster.com | last post by:
I have a subform named "sbfrmParts" with a list of parts along with the quantity and price. I have used a text box in the subform's footer and set the control source to "=Sum(*)". I set the...
2
by: Reginald Bal | last post by:
Hello, I created a main form with 2 subforms. In an attempt to move to the next record (or new record) on the main form I get the error " Method 'requery' of object '_Subform' failed". The...
3
by: Steve | last post by:
Is there a way to put a main form/subform in a continuous form so I can scroll through all the records in the main form? Thanks!
3
by: Gordon Padwick | last post by:
I have two tables in Access 2003. The first table, that contains common names of plants, has two columns: CommonNameID (primary key) and Common (common name). The second table, that contains...
0
by: farid121 | last post by:
I am trying to update the main form with each record in the subform. I have two tables Invoice and Payment table. The main form has the payment details which I need to update for each invoice...
5
by: mule1350 | last post by:
I have a main form ApplicationSubmission with the data entry property set. I'm trying to add a subform to it, that allows the user to select from a list of standard documentation the user...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.