Modules & VBA :: Navigation Control Subform Saving

Jul 18, 2013

Access 2010. one of the forms i load into a navigation form is in datasheet view and some vba re-sizes all the columns as it loads in.

However, this then means that when i try to navigate away to another form i always get prompted whether to save the form or not.

because the form is in a navigation subform i can't use:

Code:
DoCmd.Save acForm, Form_NavigationForm.NavigationSubform.Form.Name
' or this...
DoCmd.Save acForm, "my_form"

in both cases i get an error : the object my_form isn't open

View Replies


ADVERTISEMENT

Forms :: Navigation Form - Using DB Forms Under Its Subform Control

Jun 19, 2013

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?

View 4 Replies View Related

Modules & VBA :: Navigation Form - Filter On Subform Not Working

May 12, 2015

I have a navigation form which has two subforms on it (ie 2 tabs linking to different forms). I have got aq filter working for one of the forms but not on the other. This is using

If IsNull(Me.txtoperationscontract) Then
MsgBox "Please type a contract number into the textbox!", vbInformation + vbOKOnly, "Incorrect Details"
Else
Me.OperationsSubform.Form.Filter = "[Contract]='" & Me.txtoperationscontract.Value & "' "
Me.OperationsSubform.Form.FilterOn = True
End If

The problem is that it does not work on subform B because the Contract field does not exist.

View 6 Replies View Related

Modules & VBA :: Subform In A Tab Control Form

Mar 3, 2015

I have main form (frmProcedures) that has a tab control with 2 pages. One of the pages I have a subform that contains a listbox control controlled by a query.The subform is a search and display form. When I open the subform on it own, it opens up fine. However when I try to open up the mainform, it always prompts me to enter the parameter value. I have to atleast hit "Enter" for the form to open up.Even after hitting the enter key, when I try to navigate to that page, I keep getting the parameter prompt.

Here is the query that populates the listbox control. And the parameter that is prompted is Forms!frmSearchMulti!SrchText that you see in the query below

SELECT Procedures.ProcedureName, Procedures.BusinessLine, Procedures.Manager, Procedures.ApprovalDate, Procedures.NextApprovalDateFROM ProceduresWHERE (((Procedures.ProcedureName) Like "*" & forms!frmSearchMulti! SrchText & "*")) Or (((Procedures.BusinessLine) Like "*" & forms!frmSearchMulti!SrchText & "*")) Or (((Procedures.Manager) Like "*" & forms!frmSearchMulti!SrchText & "*"));

I do have a searchbox that when updated with search string issues the requery to update the values in the listbox.

View 3 Replies View Related

Modules & VBA :: Recordset Referencing Control Value In Subform

Nov 10, 2014

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.

View 4 Replies View Related

Modules & VBA :: Reference To Control In Subform From Query

Oct 10, 2013

I have a main form "KZ_SEARCH" and within this I have a subform which is loaded when a button is pressed and is populated with query results (based on text entered in a text box). The subform is called "KZ NOTICES Query subform". That all works fine and the query modifies based on the text entered every time the button is pressed. The next stage is that when the subform is loaded I want the user to be able to select a line from the subform and to jump to that record in another form (which also needs to be opened from that selection). The reference for the record to select in the newly opened form would be the first column of the selected line highlighted in the subform (control name "KZ NUMBER").

View 10 Replies View Related

Modules & VBA :: Unable To SetFocus On Main Form Control From Subform

Jan 13, 2015

I'm using form with subform. Main form header contain a combobox. I need to check the combobox is null or not before update a subform filed. If combobox is null then its back to Main form combobox from subform. The code below that I'm trying to:

Code:
Private Sub AssignTo_BeforeUpdate(Cancel As Integer)
If IsNull(Forms!frmDepartmentReview!cboDepartment) Then
MsgBox "You must select Department first", vbInformation
Forms![frmDepartmentReview]![cboDepartment].SetFocus
End If
End Sub

Then I'm getting 2110 run time error

Access can't move the focus to the control cboDepartment.

View 4 Replies View Related

Modules & VBA :: Using Form Combo Box To Control Subform Button Visible Or Not?

Nov 24, 2013

How to use the combo box from the form to control subform button or textbox visible or not?

View 5 Replies View Related

Navigation Control Of Form

Oct 22, 2004

Hello all,

I am in dire need of Access expertise. Basically, I have a form with many customer records. What I want to accomplish is to have a text box at the bottom of the form whereby I can type in a client's name which would change the record on the form to display that clients information. It would be nice if what I type into the text box doesn't have to match a clients name exactly (maybe use some sort of wildcard?). I have but a clue how to acheive this. Any suggestions would be sincerely appreciated.

View 1 Replies View Related

General :: Navigation Control With Query?

Jan 21, 2013

I have a form for testing purposes only it is named "Navigation Form". It has a tab called WorkingInitial. Within WorkingInitial I have a form called QueryTester. With a list box called List0.

Basically I want to click on the tab and the query to automaically filter based on the criteria I create. I dont want to have to create a bunch of forms with each seperte query. I want VBA to modify the Query.

This is what i have an I have no clue why it doesnt work or what I am missing.

Code:
Private Sub WorkingInitial_Click()
Dim strSQL As String
List0 = strSQL
strSQL = "SELECT * FROM [Table1 Query].[My.StatusInitial] WHERE StatusInitial = 'Working';"
End Sub

View 5 Replies View Related

Forms :: Edit Button With Navigation Control

Oct 21, 2013

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.

View 1 Replies View Related

Forms :: Navigation Control And Switch Between Tabs

Jun 16, 2015

I'm using a navigation control with 3 tabs. I would like to open a specific tab after the user login. I tried this but it does not work:

NavigationControlName.Tabs.Item("tabNameToOpen").S etFocus

I have tried:

Me.NavigationSubForm.SourceObject = "FormName"

then the form change but the tab selection no!

View 14 Replies View Related

Forms :: How To Pass Value From One Navigation Subform To Another Subform

Mar 29, 2014

I use to Navigation form called "frmMain" and it's subform is "Transactions" and "frmTransactionsDetail". I just want to pass value from a field in "Transactions" Subform to other field in "TransactionsDetail" Subform by command button with vba syntax.

And Other one thing I want that, when I click a button Subform will refresh with vba syntax. How to refer.

View 1 Replies View Related

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:

forms!mainmenu!navigationsubform.form!potential_me mbers!frmAdvertisements!cboadvid

Along with every other variation I can think of. The form itself is frmAdvertisements but I'm using it in a tab control and I also tried:

forms!mainment!navigationsubform.form!potential_me mbers!adv!cboadvid

View 6 Replies View Related

Forms :: Option Group - Control Still Saving After Undo / Cancel

May 22, 2014

This frame controls an option group. If they are in an existing citation and want to start one for another type, this offers to write a new record in when they try to switch. Problem is, if it DOES write the new record, it seems to be saving the old record, and thus both will end up 56, for example. Access seems to be ignoring/overwriting the Me.frameCitationType.Undo (I don't want to use Me.Undo because they may have made other changes as well).

If the user does not spawn the new citation, it undoes fine. I suspect the problem may be the Filter/FilterOn?

Code:
Private Sub frameCitationType_BeforeUpdate(Cancel As Integer)
Dim chap As Integer
Dim othercit As Variant
Dim curRecord As DAO.Recordset
Dim curDefend As DAO.Recordset
If Me.NewRecord = True And IsNull(Me.CaseNumber) Then
MsgBox "Enter the Service Order and Increment first, please.", vbExclamation

[Code] .....

View 3 Replies View Related

Navigation Button In Subform

Nov 29, 2005

Hi,


I've got a form including a subform in datasheet view. I get rid of the defaulted scroll bars and navigation icons provided in the subform.


Now, I added my own buttons in the footer section to manage records in my subform ; by checking the forum, I understood that the items put in the footer or in the header section won't appear if I use the datasheet view.

Is there a way to use my own navigation buttons instead of the default ones ??


cheers.

Fab.

View 8 Replies View Related

Forms :: How To Get Rid Of Navigation Bar From Subform

Sep 11, 2013

I cannot get rid of the navigation bar from the subform. Navigation bar property from the subform is not appearing at Properties.

Also, how do I remove the left column?

Attached is a picture.

View 7 Replies View Related

Forms :: Navigation Form With Subform

Feb 11, 2015

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.

View 2 Replies View Related

Forms :: Subform Box Beside Navigation Button

May 12, 2014

A message "Microsoft Office Access has stopped working" appears everytime I input something in the Subform [Search] box beside navigation button. After that, the database closes. Attached is the screenshot of my subform.

View 5 Replies View Related

Saving Subform Records

Sep 14, 2005

I have a subform within a form and the subform has the child records for the main form. When I move from the main form to the subform by tabbing the records in the main form are saved. However, in the subform after it is completed if a certain field in a groupbox is chosed another form opens up which contains records in the many side of the relationship with the first subform. The problem is that the first subforms records aren't saved because the originall form isn't closed and I don't want it closed...How would I save those subform records when the new form opens up?

Thanks,

View 3 Replies View Related

Forms :: Updating Navigation Subform From Another Form

Feb 12, 2014

I'm using Access 2010 and need to update a sub form in a form that is within a navigation form. So it goes:

Navigation Form > Main Form > Subform

How do I do this? I've attached the following to a click event of a cmd button but I just can't get it to work:

Forms!frmMain.NavigationSubform.Form.frmJobHeadSub Form.Requery

View 10 Replies View Related

General :: Referring To Subform In Navigation Form

Mar 5, 2013

I have an Access 2010 application and I'm having trouble referring to properties in my subform withon a Navigation form. Based on a selection in a Combo Box, I need to change the filter on the subform. The relevant forms are:

Main Navigation Form = frmAdminNav
"Standard" Navigation Subform = NavigationSubForm
My Subform = frmShowInventory

How do I refer to the Filter property on frmShowInventory?

View 2 Replies View Related

Saving Form Data Before Going To Subform

Jun 29, 2006

And another question...

In my database I have a button on a form which leads to a subform popping up. On the subform popping up, I display data from the first form. However, unless I first save the original form and then go to the subform, the data isn't passed on. How can I make the button both open up the subform and save the form so that the data is passed on?

Again, any help is much appreciated.

View 1 Replies View Related

Forms :: Subform Not Saving Automatically

Dec 23, 2013

I have one problem with subforms. I have one bound main form and two bound subforms: one subform is used to display existing records in datasheet view while another is used to enter new records in form view, but this latter subform for new records will not save automatically, nor will it save by using the me.refresh or me.dirty=true in the unload event of the subform control. The parent child relationship is intact. I can even see the primary key of the new row in the subform but it does not appear in the table that the subform is based on. This primary key adds by one automatically.

I have struggled and finally made work a combo box in the main form that finds existing records but also is able to add new records when the value entered is not on the list. Below is the code I used. I am not sure if this code is overriding Access's save ability of the subform?

Private Sub Combo316_AfterUpdate()
Dim n As String
gblvariable = cbobox
Me.Requery

n = DLookup("ID", "[Customers Extended]", "[Customer Name] = '" & Me!Combo316 & "'")

[Code] .....

View 14 Replies View Related

Forms :: Saving Information In Subform?

Dec 3, 2013

I have a subform and I want to save the username to the bound table in this subform.

I've tried creating a textbox (CompBy) and then setting the default value to = Environ("UserName") but this doesn't work.

I've tried placing the following in the afterupdate event of the subform:
Me.CompBy = Environ("username")
DoCmd.Save
But this doesn't work either.

View 1 Replies View Related

Forms :: Update Query From Subform On Navigation Form

Jun 17, 2013

I have a navigation form, a navigation subform, and then a subform. When I click the save button on the navigation subform, i need the data entered in two fields on the subform to save in a table. the subform is based on a query. This is what I currently have on the the button's onClick event:

Code:
Update data_tbl
Set [data_tbl].[Approved] = [Forms]![Navigationfrm]![Navigation subform].Form![Entry_subfrm].[Form]![CboAppd]
[data_tbl].[Comments] = [Forms]![Navigationfrm]![Navigation subform].Form![Entry_subfrm].[Form]![txtComments]
WHERE [data_tbl].[ID] = [Forms]![Navigationfrm]![Navigation subform].Form![Entry_subfrm].[Form]![ID]

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved