Forms :: Subform Needs To Open On First Record

Jul 27, 2015

I have a series of combo boxes on subforms whose control sources are fields in a table that has a many-to-one relationship to the main case-information table meaning that there will likely be several records for any case. I need each combo box to open onto the first record for each case rather than create a new record. I've seen code that does this, but under somewhat different conditions, and my VBA skills are too rudimentary for me to be able to adapt the code to my needs.

View Replies


ADVERTISEMENT

Forms :: Open A Form For Adding Child Record Related To Highlighted Record In Subform

Oct 2, 2013

Is it possible to open a form to add a child record related to the highlighted record in the subform?

View 2 Replies View Related

Forms :: Open A Subform And Display Last Bottom Record

Jun 27, 2014

I got a form / subform relationship.how to locate the bottom record, when the user after some queries input at the main form. I desire to display the bottom end record (EOF), instead of some sorting and display the last record at top of the subform!!

View 11 Replies View Related

Forms :: Getting Subform To Open To A New Record When Button Is Clicked

Mar 3, 2015

I have a subform [ctrlLogDetail] on a parent form [incidentdetails] that is opened by the user when they click on a button on a navigation form. These forms are used for a variety of purposes. The problem I'm having is that the user needs to be able to select an incident number and go to the appropriate form (I accomplish this by using this code: DoCmd.OpenForm "IncidentDetails", acNormal, , "Activity_ID = " & Me.cboINum in the on click event of the button.) This works appropriately. The subform is also appropriately linked to the parent form.

I need an additional line of code to have the subform go to a new record when the form opens to an existing incident number. Since I use this form/subform when doing different tasks, having the Docmd.RunCommand acCmdRecordsGoToNew in the Form on open event isn't optimal.

I only want the LogDetail subform to open to a new record when the user wants to add an entry, but not when they need to edit a specific entry. What is the appropriate syntax to use either in the openargs event of the openform command or elsewhere in the procedure so that the gotonew function on the subform only occurs when this button is clicked? I'm having difficulty getting access to understand that I want the subform to open to a new record but not the parent form.

View 1 Replies View Related

Open Record In Main Form By Clicking Record ID In Subform

Dec 16, 2014

I am creating an events database. In my main form, I have all the details of a single event (billing code, fees, customer, support personnel, etc.). Then, I have a subform (form view) that lists each of the other services which share an event ID (this ID comes from a separate, unrelated events management suite). In the subform, I display the most-commonly-edited fields so that they are editable without navigating to a different record.

However, there will be instances where it becomes necessary to navigate to one of the records listed in the subform. I would like to make this a quick process by just clicking on the primary key in the subform, and have the corresponding record appear in the main form.

In my searches I've found a common suggestion to use a DoCmd.OpenForm method where the form opens to that specific record -- in effect filtering by the primary key number. I don't prefer this method because it disables the ability to navigate to other records using the previous, next, find records, (etc.) buttons without closing and re-opening the form.

Is there a way to make the main form 'jump' to a specific record by clicking on a control in the subform, without limiting the ability to navigate in the main form?

View 10 Replies View Related

Open Subform At Particular Record

Feb 2, 2005

Hi All

I have a subform called frmProducts and on it I have 2 command buttons One is to use the current open form to jump to a particular product to make it easier to edit the details and the other is to use the current form and jump to a new record.

Now I have this working when running the form on its own but when I try and run it as a subform it does not work. I am not sure how to adjust the coding to let this happen.

the Main forms name is "MainForm"

Below is my current coding to open the form at a particular record

Private Sub EditProduct_Click()
Dim Msg As String
Dim Title As String
Dim Defvalue As String
Dim Answer As String
Msg = "Enter a Product Name: "
Title = "Open Prouct Form"
Defvalue = ""
Answer = InputBox(Msg, Title, Defvalue)

If Answer <> "" Then
DoCmd.OpenForm "frmProducts", , , "[ProductName]='" & Answer & "' "
Else
DoCmd.OpenForm "frmProducts"
End If
End Sub

Below is my coding to open the form at a new record

Private Sub NewProduct_Click()
DoCmd.GoToRecord , , acNewRec
End Sub

Many thanks in advance for all assistance

Sirch76

View 2 Replies View Related

Open Last Record In A Subform

Nov 30, 2006

Hi,
I have a form, with a subform in it.
I am trying to add a record through the subform then once added I want to display that record..
at the moment I add the record but the first record is shown.

I have tried adding :

DoCmd.GoToRecord , Forms!frmviewscheme![QScheme_Establishment subform], acLast

but recieve a run-tim error 2498.

can anybody help me ?

regards,
Ja

View 8 Replies View Related

Subform Open To Last Record

Mar 22, 2013

I open a form to a blank new record, then when using a combo box to select a record I need the subform to open to the last record. Having trouble doing that. Both form and subform are Single views.

View 1 Replies View Related

Scrolling A Subform To The Last Record On Open

Aug 27, 2006

Is there a way to automatically scroll a subform on opening so the subform is filled with the last few records along with the new record data entry line?

Thanks for any help,
Mike

View 10 Replies View Related

Forms :: Highlight Unbound Subform Record That Matches Other Subform Record

Jan 22, 2014

I have two unbound unlinked subforms residing on a 3rd unbound main form. When I enter the current record on Subform1 I would like the matching record(s) on Subform2 to be highlighted or otherwise formatted. I can get this to work for only the first record on subform2 due to the way I have my code setup on Subform1:

Code:
Private Sub Accounting_Unit_Enter()
'find where AUs match. only works for first Subform2 record
If Me.[Accounting Unit] = Forms!MainForm.[Subform2]!AccountingUnit Then
msgbox "Match"
End If
End Sub

My thought was that I needed to reference the Recordset of Subform2 and search for all AccountingUnits that match the current AccountingUnit of Subform1,

View 6 Replies View Related

Open A Form And A Subform On A Specific Record

Mar 7, 2006

I am trying to open a single form with a single subform with a command button. I would like to open the form with the subform on a specific record but I am not entirely sure how to do this, I was wondering if someone had any advice that could help.

View 2 Replies View Related

Using OpenForm Macro To Open A Subform To A Specific Record

Aug 24, 2006

Hello, fantastic site you have here!

I have a form based on a table called TermWithPaysStoredData that shows a single row for everyone in the table with a small amount of info from the table and has controls for a user to enter dates which writes to that same table.

I have a subform that reads that same table but has much more information about each row. I would like to add a button to each row of the main form that says "More Info". When clicked, it should open the subform to the same employee.

The field I want to match is called ID. My main form is called fTermWithPays and my subform is called fTermWithPaysMoreInformation.

I tried using the OpenForm method but that either opens the form to the first record or filters and shows only one blank record.

I'd like to use a macro for this if possible because I don't know VB.

Any ideas? Let me know if more explanation is needed.

Thanks very much!

View 2 Replies View Related

Click On A Record From A Continuous Subform To Open A Report?

Sep 5, 2013

I have a form called GetdataFrm. Within it i have a combo box that filter a query. When the combo filters, it populates a continuous subform called GetDataQrysubform. GetDataQrysubform look like a table that contains this Jobcode information:

EmployeeID Jobcode CardAccess Folders Software

When I filter the GetDataFrm form, I want to be able to click on a Employee's EmployeeID number from a single record in GetDataQrysubform and then a form called SingleRefrm would pop up taking me to that record.So far I have a event procedure coded to open up SingleRefrm, when the EmployeeID field is clicked but its not working. The code looks like this:

Code:

DoCmd.OpenForm "SingleRefrm", acNormal, , "EmployeeID = '" & Me.EmployeeID & "'"

View 9 Replies View Related

Forms :: Clicking A Record On A Datasheet Form To Open Record In A Pop-up

Apr 23, 2013

I have a form "IntUnderwriterSearchByName" which is based on the query "Search by Name". This form opens with a parameter (please enter name of broker) and is set out like a datasheet with the following fields- "Broker Name", "Domicile", "Broker Code" and a couple of others. I'd like to be able to click on a record and open the form "IntUnderwriterPopUp" so that the details of that specified record are displayed.

Broker Code is what I'd like the form to look for and this Broker Code is unique for every one of the 900 or so records. This code can be numerical e.g. 01233 but also can be a mixture of both e.g. EU2885. It is also worth noting that this code is not the primary key- i have an autonumber (called ID) that does this- but this field does not appear on the form.

View 7 Replies View Related

Forms :: Click Button To Open Dropdown To Open Record The Filters By Dropdown

Jul 28, 2014

I currently have a button that opens a report. the report pulls from a query that has parameters set to "fromdate" and "todate". instead of using dates and parameters that pop up as blank text boxes, I would like to click the button, have a form pop up with a combo box to select all of the options available (currently 23 options) and then click a button to make a report that only displays the record (1-23) selected. I do not need any time constraints because as the databases get updated with more records, there would be more than 23 options to choose from.

View 1 Replies View Related

Forms :: Selecting Record In Parent Subform From Child Continuous Subform

Jan 26, 2014

I have two subforms on a main form. Both use similar queries and nearly the same set of records and PK. The first subform is for data entry and the 2nd subform is a continuous form that lists the entries in order that are made from the 1st Subform. (for entering in vacation days and appointments)

The continuous form cannot be edited, it is to be a list for viewing the information only.

I have an edit button next to each record on the continuous form. When the button is clicked, I want it to take the 1st subform to that specific record as well (same PK), so the information can be edited there.

I cannot figure out how to get the 1st subform to go to the record on the continuous form when the button next to that record is clicked on the continuous form.

I tried the DoCmdSearch for record and just keep getting object is not open errors.

View 2 Replies View Related

Forms :: Open Form With Specific Subform

May 16, 2014

Basically I have a database that records commitments for clients. The user can go a client form, and within that form there is a subform which shows each expenditure commitment for that person (wihtin the subform there is also another subform that shows all income attached to each commitment). The user can use the Next and Previous buttons to navigate through the expenditure commitments (and the same if they want to navigate through the income commtiments within each expenditure commitment).

If you double click on any specific commitment whithin any part of the subform, then the expenditure commitment form (or the income commitment form if it is an income one) opens to allow the user to change stuff.

My database is set up so that each time a form opens the previous form closes. So when the user has the commitment form open and clicks close, the client form will re-open. My issue is that is always goes back to showing the very first commitment and the user then has to navigate back through till they find the one they have just updated.

What I would like to be able to do is when the user closes the commitment for that the client then the form opens up with the specific subform on the screen that they have just changed.The code I currently have written on the Close command of the Commitment is as follows:

Code:

Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmTotalCommitmentsbyClient
stLinkCriteria = "[FrameworkID]='" & Me![FrameworkID] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "frmCommitments"

I essentialy just need the bit that would also say show the subform (which is called subfrmComms2) where the commitmentID = the commitment ID on the Commitment form.Now just to really complicate matters, I would also like this to happen if someone has the Income Commtiment form open and they close it, only the Income Commitment subform is actualy a subform of subfrmComms2 (above), but equally the income commitment form has within it the Expenditure ID, the Income ID and the FrameworkID.

View 3 Replies View Related

Forms :: How To Open Subform By The Selection From Combo Box

Feb 4, 2014

I have a form that contains a form (Contain business data) and a then a sub form that hold the companies history of donations. BUT I also have another forms that hold miscellaneous data that I would like to look at also in the sub form area.

I want to select the sub form by a combo box to show the "sub forms"I want to look at by selecting a menu from a combo box.

I have worked with Access for years but some reason the combo box has always been difficult for me to completely understand.

View 1 Replies View Related

Forms :: Open Link Form From A Subform

Dec 16, 2013

I have a form containing company records. In a subform I have contact records for individuals in each company.

Each of those individuals has a child table for adding contact notes (telephone, email). I want to add a button to the subform to open a new, separate form so I am able to add notes.

I used the wizard to create a link button but I get

Code:
Syntax error in query expression

So does Access assume the button is opening from a form rather than a subform or does it not matter? Is there something I need to change to the following code?

Code:

stDocName = "Form_Companies_Notes"
stLinkCriteria = "[Company_contact_ID]=" & Me![Company_contact_ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

View 3 Replies View Related

Forms :: Requery 2nd Subform When Different Record Highlighted On First Subform

Sep 3, 2013

I have two sub forms on a main form.Subform 1 displays information which comes from a query, filtered using two combo boxes on the same form.The active record on the data sheet has two field values output to hidden text boxes on the form.

These text boxes then provide the values used for the query displayed on the 2nd sub form.When I highlight a new record in subform 1, the text box values change, but the values in sub form 2 do no.Which would be the best method to use to get this to requery?

View 10 Replies View Related

Forms :: Open A Form Which Contains A Subform With Blank Fields?

Sep 7, 2013

I have a [Order Central table] that compiles products from four different categories that employees can order from.

Employees using the database will select from four categories on buttons which opens up the order form EX: [Category 1 form].

They enter their order info on [Category 1 form] into a subform sourced from [Category 1 Table] called [Category 1 subform].

Is there a way that they could select the "Category 1" button, which would run a macro opening [Category 1 form] with the [Category 1 subform] having a where condition of 1=0 (or just so that the subform appears blank)?

View 7 Replies View Related

Forms :: How To Open Form Depending On Field In Subform

Sep 22, 2013

I have a Table table_clients and a connected table (1-->many) table_invoices.

I have two forms:

form1(table_clients): all clients with subform1(table_invoices): all invoices for every client

the form2 and subform2 are the same, just objects are placed differently on page.

I want when I have opened a record on form1/subform1, to be able to click a button and open form2/subform2 filtered by the invoice_id and the client_id.

View 13 Replies View Related

Forms :: Open Up A Form To Specific Records In Its Subform?

Aug 6, 2014

I need to open up a form to specific records in its subform based on user input from combo boxes (Customer and/or PKGEngineer). The two combo boxes are on a switchboard. How can this be done?

Using:
Win 7
Access 2010

View 14 Replies View Related

Forms :: Open Query Results In Unbound Subform

Oct 28, 2014

I have a main form (start_protocol) with an unbound subform (placeholderform).

Using a button in mainform I open a search form (search_protocol) inside the unbound form, by the code:
-------------------------------------------------------------------
[placeholderform1].Visible = False
[placeholderform].Visible = True
Me.placeholderform.SourceObject = "SEARCH_PROTOCOL"
--------------------------------------------------------------------
The search form (has a run query button) is build from a query named: search_protocol.

I want to be able, as soon as I pass the button, to have the results (from the query) inside the unbound subform, of the main form (Start_protocol).

View 2 Replies View Related

Forms :: Main Form Jumps Back To 1st Record When Moving To Next Record In Subform?

Mar 24, 2015

When I add a record in the subform and then move to the next record whilst still in the subform, the main form jumps back to its first record? I then have to move back to the right record in the main form to update the next record in the subform.

I want to move to the next record in the subform without affecting the main form.

View 1 Replies View Related

Forms :: Select Record From Combobox List And Have Record Populate In Subform

Sep 16, 2013

I would like to select a record from my combobox dropdown list and have that record populate in my subform. Currently, I am only able to select the 1st record at the top of the dropdown list to appear in my subform. But I would like to select any record from the dropdown list and have it populate my subform.

View 8 Replies View Related







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