Forms :: How To Use Count Function In Navigation Form
Jun 1, 2014
I want to be able to use the Count function that will reside in the header of the main navigation form that will count the records in each navigation sub form (of which there are 6 sub forms)
Each sub form has the same primary key which is what I am doing the count on.
I have done this on another form with no subforms by creating a Textbox with this code: =Count([PCNumber])
I have tried to put this in the header of the main navigation form with various itterations, the last being: =Count([Form]![NavigationSubform].[PCNumber])
But what ever I do seems to come up with "Error" in the textbox.
For info, the form names are:
Main form :StockViewsForm
Subform:NavigationSubform
PCNumber being the PK I want to count.
Is this possible of do I need to specify the names of the actual forms that reside in the Navigation Sub Form ??
I am not able to disable NavigationButton when i login navigation form using login form. I am using MS access 2007 - 2010.i am using below code but getting error.
Doing a school project and need to add a count function to a sub form that is based on my query. The count function just needs to be displayed on the bottom of the sub form showing how many records are in the sub form.
When I do this, the function works all good.
When I add the function to a header or footer, so that it doesn't show a column and repeat itself each time.
The first is called:TypeOfMedia: Left([MediaID],1) Grouped BY Result C D G
The second is called: CountOfProducts: Count(*) Expression Result: 1 15 1
This query has counted the number of CDs, DVDs and Games entered. The first letter of the MediaID fields indicates what type of product it is. A typical DVD entry would be: D2387
I now need to implement the totals on a form with other fields such as the name of the DVD.
The other fields are:
Ptitle: text Type: text Cost: currency Penalty: currency
The trouble I am having is to successfully implement a count procedure where I can have three fields each showing how many of the various products there are, open at the same time.
Would any of my esteemed colleagues out there have a solution to this problem?
SELECT Count(T_STUDENTS.studentsID) AS res1yes, T_COACHING.COACH1res, T_COACHING.COACH1port, T_COACHING.COACHworkgroup FROM T_STUDENTS, T_COACHING WHERE (((T_STUDENTS.res_vrijstelling)=False) And ((T_STUDENTS.stud_year)="1") And ((T_STUDENTS.stud_coach)=forms!F_cboCOACHING!cboCOACHING)) GROUP BY T_COACHING.COACH1res, T_COACHING.COACH1port, T_COACHING.COACHworkgroup;
It runs fine, untill the moment the count is 0. At that point it breaks the form. How can i tell access to deal with this? Somehow i need to replace the count result with 0 if there are no records that meet the criteria.
New to the navigation form: I need several forms in the navigation form to all relate to the same client ID field. I have this information on the main form but the form with in the navigation form will not pick it up.
I have tried =[Forms]![Frm Client Information Navigation Panel]![ClientID] But just cant get it to pick up that information...
I would like to have something like the master link fields and, child link fields but when I add a form to the navigation form this option in not available.
I am attempting to create a Navigation Form to allow another computer in my network to be able to utilize necessary forms within a database (through RunTime). I was hoping this would be a clean task by simply loading the forms into the tabs of the Navigation Form, however that is clearly not the case.
For starters, When attempting to use a form that has some VBA behind it (Docmd.ApplyFilter based on a selection from a combo box), I am given the error stating: "The action or method is invalid because the form or report isn't bound to a table or query."
After searching on this error, I believe it's because my Navigation Form does not have a record source. If this is the case, then I am confused as to what record source it should have, as with the 3 forms I need to access through the Navigation Form all pull data between various tables and queries within the database (some not related).
Now I've also come to the conclusion that my VBA references now must change in order to correctly use my forms. A correct reference would look something like:[Forms]![Navigation Form]![NavigationSubform].[Form].[My Form's Control]..Is this necessary in order to write any events, such as an AfterUpdate on a combo box?
I'm working on the Navigation Form template in Access 2010, which is new to me. It appears that one needs to use the BrowseTo command to open up a form in the built-in subform module. I'm trying to create a couple of buttons where each button opens a form in a different data mode; one in read-only and one in add mode. Here is the syntax I used for read-only:
frmSales is the Sales form I want both of the buttons to open and frmNavigation is the Navigation form. It seems to be ignoring the data mode part at the end however. It only will open in Edit mode. Is there something I'm doing wrong with this command?
I would like to know if it's possible to open an specific subform inside a navigation form using an event.
I also need to to this using macros ( really can't use vba in this project =/)
Form example:
the main form has "nav_opt1", "nav_opt2", "nav_opt3"
By double clicking a record in "nav_opt1", it will open "nav_opt2" with some filters (but all in the same window), as if I was just browsing through the navigation forms usually.
I have a Navigation form that has multiple forms that I linked to buttons at the top. They open the forms (now subforms) for the most part just fine. The issues come into play when I click on a combobox that pulls from a query of a table. Once this data is selected I have another combo box that is supposed to be filtered based off of the original combo box selection. Everything works on the original forms but once they are in subform form I get the error "Forms!MGM Search Form!STATE" which is the name of one of the forms and its asking for me to enter a parameter value for the query. Its almost like its not requerrying the data like it does in the original form
Private Sub State_AfterUpdate() me.Facility.Requery End Sub
basically the first combo box is a list of states and then the second combo box is a list of facilities in that state. Once you click on the state in the first combo box it filters the facilities in that state. But again once in the subform view it will not requery.
I'm attempting to create my first split database and I'm failing. Here is what I did in the exact steps.
1 - Created a database with one table and 11 forms (database is on my desktop).
2 - I created a split database and saved the back end on our company network.
3 - The front end is on my desktop(works fine)
4 - I put a copy of the front end on the company network (near the same location as the back end)
When I tried to open the front end from another persons computer who has access to the location i saved the back end and front end db's . It open fine, but my navigation form will not open the other forms. I get a blank sheet.
So I have made all the necessary forms to start working with my Access, and now I need a main form, a home where I should put all the buttons to enter each form.I have used the Navigation Control on a New form URL...
A row with buttons appeared, and I complete the property: Navigation Target Name with the target form, but it is giving me some trouble with a searchForm and a Query. Every time I enter this form (using nav control), Query asks for an Input.
I have used one of the members' code which was posted in a tread before to create a search box in a form. This code works perfectly when the form itself is open. Otherwise, when I put this searching form along with other forms in one navigation form, I get the following error: "Enter Parameter Value: Forms!FRM_SearchMulti!SrchText"...The code that was used for the Search box is as following:
Private Sub SearchFor_Change() 'Create a string (text) variable Dim vSearchString As String 'Populate the string variable with the text entered in the Text Box SearchFor vSearchString = SearchFor.Text
I have a form with a bottom that has a macro that uses applyfilter to filter the current form based on what is within a textbox located on the form.
I used the macobuilder and have my where condition as
[num] Like "*" & [Forms]![frm_Main]![Text181] & "*" Or [name] Like "*" & [Forms]![frm_Main]![Text181] & "*"
This works when I open the form by itself but when I try adding the form to a navigation form I get prompted to put in "num" and "[Forms]![frm_Main]![Text181] " etc. when I click the bottom.
I have decided to move away from Switchboard in Access 2010, to what I find to be more user-friendly; the Navigation Forms.
However, when I attempt to export any of the data from my navigation forms, the result is a blank Excel sheet. I can easily go into the forms themselves on the left navigation panel and export from there, but when myself or a user attempts to do this from the navigation forms themselves; well, the blank Excel sheet is the result.
How do you create a work-around, so that it is possible to export to Excel from these navigation forms?
Can I use combo boxes placed in the detail area of a navigation form, above the sub menus but below the navigation? I am not able to get one to work properly . I can set it up but when I run the form, and try to pick an item from a list, it will not work...
I have three forms - Form1,Form2 and Form3 linked to a navigation form with Navigation buttons. I have separate VBA codes under each Before update event of these forms, Form1,Form2 and Form3 to call a VBA module to track the changes performed by the users(Like an Audit Trail) in specified fields of the forms which will track them to a table.there are control tags in the form properties --> others --> Tag to track the changes in the fields which are defined in the VBA Module.this is the code to call the VBA Module:
Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.NewRecord Then Call AuditChanges("UniqueID", "Part No", "NEW") Else Call AuditChanges("UniqueID", "Part No", "EDIT") End If End Sub
[code]....
The code is working perfect when the forms are run separately.but when they are run from the navigation form by clicking the navigation buttons, the code is not working !!
I have a form with a lot of data structured in tabs. Since the tab loads all the data at once while the navigation form browses to the desired form. I have tried but the issue is the Master-Child link. The form in the navigation form is not considered as a subform, hence, no way to set a Master-Child link. The navigation form itself is the subform but even when setting up a link there it has no influence on the form displayed by the navigation form.
On tab 1 of my navigation field i have a combo box which i use to select the record i want to look at.
but then if i click on another tab in my navigation form to have a look at another set of forms (not related) and i click back on the first tab with my combo box the combo box has reset it'self to be blank - not selected.
Is there a way that i can get the combo box to remember the last record that was selected and automatically go to it when i go back to the first tab?
I have my setup all complete and everything works great. Now, I have a subNavigation form within the Navigation form. Thing is, I am not sure how to go about the code for the query to pick up the Beginning and End Date to generate my report. Here is my Form setup:
frmNavigationForm (Main form) - Tabs on top. NavigationSubform (first Navigation Form, where I have a tab called Admin) frmAdminNav (where I have embedded under the Admin tab) - Tabs on left side. NavigationSubform (Second Navigation form where I have a tab called "Search") I don't recall what the name. How do I find it, stupid question, I know... frmSearch (where I am trying to pull a detailed report from date search criteria)
Here is one of the codes I have been trying to use in my Query and nothing seems to work.
Code: Between [Forms]![frmNavigationForm]![NavigationSubform].[Form]![frmAdminNav].[Form]![frmSearch]![BeginDate] And [Forms]![frmNavigationForm]![NavigationSubform].[Form]![frmAdminNav].[Form]![frmSearch]![EndDate]