Forms :: Referencing A Control On Access 2010 Navigation System
May 29, 2015
I have an Access 2010 Database frontend to SQL Server 2008 Backend. So far there are 3 Tabs in the Navigation System. The first one is the primary Data Entry form which has a tab control with 3 subforms.
Here's the problem. The database is designed to track potential members based on different types of Ads. The primary Data Entry form holds all of the demographic data for the person that called in response to an ad. The first tab has a subform to track how many times that person has contacted us. The second subform tracks which advertisements the person is contacting us about and the third tracks which Events that person attended. There is no correlation between contacts, Ads and Events.
On the Advertisements we have about 7 different types of Ads we do and each ad can be run multiple times on different days. We want to be able to track which Ad the person contacted us about. The Advertisement subform has a comgo box for the Ad type and a combo box for the ad date. the source for the combo box for the ad date includes the combobox for the adtype as the criteria. That criteria is what's giving me the problem. I've used:
I have a 2010 Access Database with a Navigation Pane. When I click a Navigation Button to view another form I lose the position and record I was on in the first form. It's almost like the first form refreshed when I click the navigation button to view the second form. Is there a way to setup the Navigation form so when I click on various navigation buttons it won't reset the previous form I was on?
I have a Main (Home) form that has a sub navigation form (frmNavigationSubform).Need to access 3 forms. Forms 1,2 and 3. Also, have 1 options form.
Subform has 2 Navigation buttons. NavigationButton2 and NavigationButton3.
NavigationButton 2 Navigation Target Name = 1 (frm #1).
NavigationButton 3 has no Navigation Target Name. This is passed on when user picks Option1 or Option2 form options pop screen.
Now I can pass the name to the Navigation Buttons2 but the subform does not show it. I have to click on the Navigation Buttons2 again for it to show. What I want is when the user makes the choice in the options screen the name is passed and form 2 or 3 should load/show.
I have a complete working timeclock and trying to add the forms within the navigation form. I know I have to go back and re-reference everything and have already done so with the queries. But I cannot get the setfocus to work.
Here is the setup.
NavigationForm (navigation form) frmClockIn (top form) frmClockIn_SUB (bottom form) Open Navigation > Time Clock. Select an EmployeeID from the dropdown Click on clock in. (successful) cboEmployeID goes blank and try selecting the same employeeID to clock out and I get a debug at
Me.frmClockIn_SUB.SetFocus
I think there is a problem with my cboEmployeeID_AfterUpdate() as well.(related?) which used to be Private Sub cboEmployeeID_AfterUpdate() me.refresh End Sub
I have replaced "me.refresh" with "Me.frmClockIn_SUB.Form.Refresh"
(It used to break here, but not after I changed it.)
Not too sure where to set these forms to in the code
I have a main menu "MainMenuF" in my database and I would like the database to be able to be searched by any of the column headings. For example I have a table titled "NewLabReportT" this table has many column headings like "Submitted By" "Reviewed By" "Title" "Abstract" etc...
I would like my users to be able to click a radio button with the same column headers on this main menu and have a box that pops up to say "Enter search parameter" and have that parameter be searched in the table "NewLabReportT" and generate a FORM not a REPORT of all of the listings in the database that have that keyword associated to that certain category searched. That way they can "CLICK" the exact field they are looking for and have it open right up to that form.
I need to set calendar control as criteria for date in VBA query. I cannot find Calendar control in ActiveX tools in Acc 2010. Where is it?
Date picker seams like very slick and simple solution but I can see it only in database. As it might be solution to my problem, can date picker be used on a form as criteria for VBA query?
I am trying to limit the number of records displaying in a subform [amendedLoans] by selecting only those records that have the same ClientID as the mainform [Customers] and the same loan number as the subforms parent form [ClientAccounts loan changes].[loanno].
I have no difficulty selecting records just using the clientid but as soon as I add the reference to the subform [loanno] field I get no selection of records. I suspect there is an error in the where clause for [Amended Loans].Loan)=[Forms]![customers]![ClientAccounts loan changes].[Form]![LoanNo]) .
I have built the clause using the expression builder and have had many attempts all ending up with the same result. I'm now at a loss as to where to go from here....
I have a database in Access 2010 where I've created a navigation form, and I want a regular user opening the database to enter a password and only have access to that form, and not the actual tables or the navigation pane. They should only be able to view, add, edit, and delete data through the forms I've prepared, and I don't want them to be able to get to the tables themselves unless they have an admin password. I tried looking up how to do something like this, and I tried splitting the database, but it seemed like I was still able to go right to the tables and edit them from the navigation pane even in the front-end, and if I removed the navigation pane links to the tables from the front-end, the forms I made wouldn't be able to display anything from them anymore, and that's not what I want either.
So, I want one password to give access only to my navigation form and nothing else, and then a second password to grant access to everything else.
i am running some code from vba to add a linked table and the do some lookups, then delete the linked tables.
When the linked table gets added, the navigation pane gets displayed. I have set it to do not display in the settings and it does not when it opens but when this code runs it opens and then stays open until the db is closed and reopened.
I am trying to use my db as a software and I really do not want this to show.
I have also noticed this in a database I have which has update queries and was fine in access 2000 but does what i described above when using in access 2010.
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?
I have a multi select list box which I am trying to use to open another form and apply a filter based on the user's multiple selections.
List box - lstCatergories Main Form - frmSuppliersSummaryCategories Subform on Main Form - frmSuppliersSummaryCategoriesSubForm
The Subform contains the text box CategoryID
Here's my code which nearly works...
Code: Private Sub cmdFilterSuppliers_Click() On Error GoTo Err_cmdFilterSuppliers_Click
Dim strWhere As String Dim ctl As Control Dim varItem As Variant
[Code] .....
My problem is that the control "CategoryID" is on the subform and I'm having massive problems trying to reference it. This is the part of my code that won't work:
I am working on Data entry form where a user can enter the details in the form and save and go ahead, its a single form in default view. I want to provide an edit button with navigation control in this form only where they can edit their wrong record for update.
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 do not want to use AutoNumber to generate my Stock Control Number. I need to somehow automatically generate a number so that when I enter data and then make an error it does not mess up the numbering system like AutoNumber does.
I am a novice who is will to try to do what it takes to get this going properly. I cant find anything online relating to Access 2010.
I'm trying to get the value of a textbox on one of my subforms and can't seem to get it properly referenced.
I have a main form Main with a tabcontrol having two pages. One page is Timesheets. Timesheets has a subform called Detail_data. On the detail_data subform is the text box Time_In that I want to reference. I can get to controls on the timesheet page but not on the detail_data part.
I've distributed a MS 2003 database to another office 1000km away using 2003 as well. The calendar control doesn't seem to be working. I'm assuming that the MSCAL.oxc isn't referenced. Is there a way I can do this programatically without actually having to talk someone through the referencing process over the phone??
I have a form called "FormA" within that form i have a tab control and one of the pages is called "Page1" inside that page1 i have a subform named "subform1" and finally inside subform1 i have a field named "field"
what would be the correct syntax to reference the value of the field???
been messing with this for awhile and am getting a headace, was hoping someone can help
I'm trying to check if a control on the subform is null. I've the following line of code:
Private Sub Form_BeforeUpdate(Cancel As Integer) If IsNull(Form!FrmOrderInfoMain!SubFrmOrderInfo.ItemC ode) Then Msgbox "Empty ItemCode" End If End Sub
..whereby FrmOrderInfoMain is the parent form and SubFrmOrderInfo is the subform. I get an error for this code as Im not sure what is the correct code to use. Thanks for the help.
I've been trying : double click a field in a subform and paste the query results into excel. I already have good code to paste in the recordset, but this recordset must reference a control value in a subform.
The query works and shows the proper results manually, but when I run the Sub it throws a "run-time error 3061: Too few parameter. Expected 1."
I can't seem to set the parameters right. Tried EVERYTHING--except the RIGHT thing.
I'm using Access 2003. In "References" (Tools > References > Browse...), I've added in "Microsoft Windows Common Controls 6.0 (SP6)" (c:windowssystem32mscomctl.ocx).
I've then created/inserted an instance of the control "Microsoft ListView Control 6.0 (SP6)" on a Form ("MyForm") and given the listvew control the Name "MyListView".I wanted to decorate MyListView with some custom methods so I've created a new class module ("DecoratedListView") which contains a member field called "lvw".
I want 'lvw' to point/reference to MyListView, but I don't know what reference type to use in its declaration. Importantly, I also want to capture lvw's ColumnClick event.
I've tried:
Code: Public WithEvents lvw As Object Public WithEvents lvw As Control Public WithEvents lvw As MSComctlLib.ListView.2 Public WithEvents lvw As MSComctlLib.ListView Public WithEvents lvw As CustomControl
and none works when I
Code: set lvw = Forms!MyForm.MyListView
The first try (Object) doesn't even compile. I get the exception "Expected: identifier" The second try (Control) doesn't compile either. I get the exception "Object does not source automation events" The third try (MSComctlLib.ListView.2) doesn't compile and throws the exception "Expected: end of statement" The fourth try (MSComctlLib.ListView) compiles but fails at runtime with the exception "Type mismatch". Using TYPENAME() on the control returns "CustomControl". The fifth try (CustomControl) compiles but fails at runtime with the exception "Object or class does not support the set of events".
I can't believe I'm the first person to have tried to capture an ActiveX Control's events in a separate class.
I have a form (named frmAddSession) with a combo box (named Band_Name) and lets say i have it displaying the band "Band A"
I have a query where the criteria is [Forms]![frmAddSession]![Band_Name]. when i run the query the results are blank. but if i type ="Band A" it works just fine.
why won't my reference to the combo box on the form work?
In a series of deductions to try and figure this out, my form only has the one combo box, and my query is based on only one table and only has the one field.
Im sorry for starting a new thread, Only I need a different topic name.
Thanks for the help Thomas, from the other thread, though my project has been blown completely out of proportion. I decided to start from scratch again today. Having no help from the teacher is a major factor because he knows only very basic database.
My initial idea for the project was to be able to set up a stock control system allowing 1 user, my Aunt to be able to order shoes, manage stock by checking orders against deliverys and updating the stock records. Also some form of allowing her to enter sales for particular shoes which would update the stock file.
I had the relationships set up so IDtype in tblStock connected to IDtype in tblOrder. I had the CompanyID in tblCompanyID connected to the companyID in tblStock and In tblOrder.
I then added some models of shoes into tblStock. I created a query adding tblStock, tblOrder and tblCompanyID. I dragged the whole tables into the query but because of the relationships, when viewing the query, there were no fields there. So upon deleting the relation between CompanyID in tblCompany and CompanyID in tblOrder, the data which I entered into tblStock appeared.
I then created a form based on this query with a combo box with its source set to tblStock allowing me to choose the models of shoes. I then put the other fields in as text boxes and made a confirm button. When the form was open, if I selected a shoe from the combo box the company information didnt appear in the fields. Once I had entered quantity, size and colour, I pressed the confirm button and this added that order into tblOrder, but no CompanyID.
This morning I realised the system should be set up including another table with a list of shoe models the user would be able to order because I had them selecting models which were in stock. I hadnt thought about this when designing the database.
I supposed what I am asking for is any general help into setting up this stock control system allowing it to do the functions that I require for my user.