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 Replies


ADVERTISEMENT

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 :: 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 :: 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 :: Main Form Locked After Clicking On Subform?

Dec 25, 2013

I have a Main Form which is essentially the based on my child table called tblTaskHistory. The Main Form has a subForm which is based on the parent table called tblTasks. I am using SQL queries to feed the combo box recordsource that is located on the Main Form. The After Update for the combo box populates the subForm which allows the users to look at details of a task before he/she "accepts" it. The problem is that when he/she clicks on the subForm to view the details of the task the Main Form locks up. The user, after interacting with the subForm, cannot make an edit on Main Form now. The user has to close the Main Form and then reopen it to perform the "accept" action. The form works absolutely as intended - that is if the user doesn't click on the subForm - however once he/she clicks on the subForm the Main Form locks up.

View 1 Replies View Related

Forms :: Show / Hide Main Form Buttons When Clicking Into Subform

Dec 11, 2013

I'm currently building a database in Access 2013. I've used Access many years ago, and not really in anger since maybe 2003, so I've been re-learning quite a lot. Here's an overview of my scenario, and issue:

The main purpose of my database is to allow engineers to log various bits of information when building, servicing and testing manufactured products for offshore exploration. Because some of the engineering team aren't so great with data entry etc, I've decided that, rather than deleting data, I'm going to use a 'deleted' flag: user clicks what he considers to be a delete button, but in reality an update query will simply update the flag and, because the form is built on a query which includes a 'where deleted = 0' filter, it'll no longer be shown. This will allow us more control over the data and will also allow me to check that everything is running okay.

My main forms include a number of subforms, including one which includes a second tier of nested form: Pin Maps for (electrical) Connectors.

What I need to achieve is fairly straightforward: as the user navigates around the form, I'd like a 'delete' button which is specific to that subform to become visible and for any other 'delete' buttons to become hidden. Once tested, the buttons would be 'stacked' in the same position at the top of the main form, so the user just thinks they're deleting the relevant record in the sub, or main, form.

View 7 Replies View Related

Forms :: Main Form With 2 Subforms Fails To Open Current Record

May 12, 2014

I have a main form "frmDriverNoticeRecord" with 2 subforms, "frmSubDriverNotice" and "frmSubVehicleRecord"..The main form uses "IncidentID" as the PK. Each form stores data in its own table. The tables are related via IncidentID and there is a 1-many relationship between tblIncident (main) and tblDN (sub) and tblVehicle (sub).

I have a form "frmIncidentLog" displaying records in a table view with a few fields for quick reference and to allow selection of a single record for detailed viewing. I created a command button with the intent to open the "frmDriverNoticeRecord" at the current record. The main form and child link fields appear to be linked correctly; i.e. IncidentID on all three. If I open the form manually it opens and I can use it and search and filter as I want. If I try to open it via the command button It opens a small window asking for the IncidenID, when I enter theIncidentID number, it opens the form to the first record every time.Here is the code:

Private Sub comOpenDR_Click()

Dim frmName As String
Dim recID As String
frmName = "frmDriverNoticeRecord"
recID = "[IncidentID]=" & Me![IncidentID]
DoCmd.OpenForm frmName, , , recID
End Sub

I tried running the the DoCmd.OpenForm command directly from the button using the where condition (in various manners) with the same results.

View 13 Replies View Related

Deleting Record Using Main/Subform While Maintaining Record Position

Jul 6, 2006

Hello All,

I have an ordering db that utilyzes the typical Form / Subform layout. I
would like to be able to delete a record from the Main form and maintain the
same postion relative to the other records. For example, if I am scrolling
through the records and want to delete record #45, After I delete it I would
like to be able to have record #44 visible to the user.

I am currently using (2) SQL statements to delete the records from the main
Order table and the Order Details table which are linked without Cascade
Delete Related Records being on.

I had set-up a recordset procedure to try and find the bookmark set before
deletion but the only way I can get the sub-form to not show a blank form (no
controls visible for the record just deleted and the #deleted in controls on
the main form) is to requery after the delete, which loses the bookmark. If
i place the ReQuery at the end it displays the records properly, (without the
blank record) but returns the record to the first record. I have tried
turning off any sorting references to OrderBy, etc. but it still returns to
the first record.

I have also tried using "DoCmd.RunCommand acCmdDeleteRecord" but it doesn't delete the record from both tables.



Dim rst As Recordset
Dim strSearchName As String

Me.AllowDeletions = True
Me.sfmOrderDetails.Form.AllowDeletions = True

Set rst = Me.RecordsetClone
strSearchName = Str(Me.sfmOrderDetails.Form.txt_Order_No.Value)
rst.FindFirst "Order_No = " & strSearchName

CurrentDb.Execute "DELETE Order_ID FROM tblOrderDetails WHERE Order_ID = " &
Order_ID,dbFailOnError
CurrentDb.Execute "DELETE Order_ID FROM tblOrders WHERE Order_ID = " &
Order_ID, dbFailOnError

Me.Requery
Me.sfmOrderDetails.Form.Requery

Me.Bookmark = rst.Bookmark
Set rst = Nothing

Thanks!

View 6 Replies View Related

Creating New Record In Main Form From Subform

Aug 4, 2005

Hi,

I want a user to be able to create a new record in the main form, after they have finished filling in the boxes in a subform by pressing the Enter key, rather than having to click the 'new record' button on the main form.

I reckon I need a 'default button' on the subform but I have no idea what this should do when clicked to create the new record...

View 1 Replies View Related

Finding Record On Main Form From Subform

Sep 12, 2006

Hello,

I have tried everywhere for a solution to this:mad: Any help is much appreciated.

I have a main form with a subform. The subform shows related records using a match criteria. Each record that shows in the subform also has a unique ID. This unique ID is also shown on the main form record (although not used to link the main and sub forms).

I would like to be able to click on a command button on each of the records in the subform and goto the Main form record. I can't find any threads that deal with this though - sorry!

Hope it makes sense

DJ

View 1 Replies View Related

Subform Record To Populate Main Form

Aug 26, 2004

I have a subform that is populated with records, filtered by two combo boxes on the main form. I would like to be able to double-click on one of the records in the subform and have it populated in the main form for editing.

Any help would be greatly appreciated.


Best regards,
MrAviator

View 5 Replies View Related

Forms :: New Parent Record When Clicking On Subform

Jun 5, 2015

I want to force an autonumber field on a parent form to start a new record when clicking on a subform, so that value can be passed to new records in the subform. Is there a simple way to do this?

I'm using Access 2010. I have a parent form based on a query that does not have any fields intended for input but has an autonumber ID field. The subform is based on a query that finds records based on the ID field in the parent. When the parent ID field has a value it works perfectly, including adding new records in the subform. When the parent ID field is blank, though, I can add new records in the subform but the ID field does not populate.

I made a workaround by adding a Yes/No field to the parent and its query that users can click to create a new record, so the ID field has a value to pass to the subform. This works fine, but I feel like there should be a better way to do this without user clicks.

Via VBA, I've tried setting the parent form to dirty, and setting the Yes/No field to Yes, along with a variety of less likely candidates like refreshing and requerying. I've tried the above on various events including the parent LostFocus; the subform Got Focus, On Click, On Mouse Move; and the same events for control on the subform.

At this point I'm not sure whether the problem is my event choice, or the object method I'm using, or just the syntax for my control references. Or maybe this is actually more complicated than I think and sticking with the checkbox option is the best way to go.

View 6 Replies View Related

Clear All The Records In The Subform Of The Record In The Main Form

Jul 19, 2005

Hello,

I am trying to create a command button that clears all the records in the Sub form in the CURRENT RECORD OF THE MAIN FORM.
I know this sounds a little bit confusing, but I hope you understand!

The main form is: frmOrder2
The subform is: subfrmItemOrder

The fields in the subfrm that has to be cleared are:

Items (combobox)
UnitID (combobox)
K1 (txtbox)
K2 (txtbox)
K3 (txtbox)
CSB (txtbox)
DTSS (txtbox)
H (txtbox)
Remarks (txtbox)


The two forms are linked by the field OrderID.

Please help me!!
Thanks!
jenny

View 14 Replies View Related

Forms :: Main Form And Subform Search For Same Record

Nov 20, 2014

I am currently working on a project in access 2010 and I am having a search for record dilemma. I have a main form that has a subform in it under a tab control. I place a search box at the top of the form so that user could select either the ID, the internal case number, and/or the reviewer name in the text boxes to search the record.

I have tried the using the search for record macros and the convert the macros to VBA and possibly write so extra coding for calling the subform into the search but nothing seems to work in getting the search in sync between the main form an the subform. VBA code that will look for same record in both forms.

The reason for the tab control is because depending on the data entered the users switch between mid section data about case and so one set of info goes into one tbl and the other goes into another, but the subform that I am referring to in this question is being generated from the same tbl as the main form.

View 2 Replies View Related

Forms :: Subform Needs Results For More Than 1 Main Form Record?

Dec 24, 2013

I have two unbound subforms on an unbound "display form". I managed to link the two subforms by following this method: [URL] This is great and works well enough, however, by design, subform2 will only display records relevant to the very first record on subform1. I need subform2 to be filtered based on ALL of the relevant records being displayed in subform1 not just the first one.

Previously, subform2 was based on a query using subform1's records as criteria, but this gave me the same result.

View 14 Replies View Related

Copy Field Data From Main Form To A Subform On Add New Record

Feb 25, 2006

I have a main form that has some sub forms on it linked by master child on PK. When I select a new record on the sub forms I want to take a date value from the main form and populate the value into a field in the sub form. How do I do this as I cannot see a new record event on the sub form?

help would be much appreciated.
regards

Peter

View 7 Replies View Related

Updating Main Form When Deleting Record From Subform Datasheet

Dec 21, 2006

Hi, I have a problem I don't know how to solve it. I have a subform in datasheet view, linked to the main form. There is a running total on the main form based on a dsum on a field of the subform.
When I delete a row on the subform datasheet, the main form calculation is not automatically updated. I had to create a "update" button to do the refresh.
Is there a "on record delete" event available for a datasheet sub form?
Thank you for any help.

View 1 Replies View Related

Find Record In Main Form Based On Selection In Subform

Nov 8, 2004

Can someone tell me how I migh find a record in a main form based a a selection in my subform?

I have a Main form called frm_ProductionSchedule.

It contains three subforms:
frm_ProductionSchedule_subform
frm_ProductionSchedule2_subform
frm_ProductionSchedule3_subform


I would like to be able to select a record within any of the subforms and have the main form display it. The main form is linked to a SQL server Table. The subform are based on queries. The unique PK field is a date field called record_date.

I should add that the Link Child/Master fields are blank for all Subforms. Each Subform is linked to a query and displays data for a particular machine (1,2 or 3) AND is updated based on a combo selection of the Production week. The queries for one subform would look something like this:

SELECT dbo_tbl_ProdSchedule.PartType, dbo_tbl_ProdSchedule.PartNumber, dbo_tbl_ProdSchedule.Work_order_no, dbo_tbl_ProdSchedule.FrameType, dbo_tbl_ProdSchedule.FrameNumber, dbo_tbl_ProdSchedule.Shift, dbo_tbl_ProdSchedule.Sch1_date, dbo_tbl_ProdSchedule.Sch1_spins, dbo_tbl_ProdSchedule.Sch1_sheets, dbo_tbl_ProdSchedule.Sch2_spins, dbo_tbl_ProdSchedule.Sch2_sheets, dbo_tbl_ProdSchedule.Sch3_spins, dbo_tbl_ProdSchedule.Sch3_sheets, dbo_tbl_ProdSchedule.Sch4_spins, dbo_tbl_ProdSchedule.Sch4_sheets, dbo_tbl_ProdSchedule.Sch5_spins, dbo_tbl_ProdSchedule.Sch5_sheets, dbo_tbl_ProdSchedule.Sch6_spins, dbo_tbl_ProdSchedule.Sch6_sheets, dbo_tbl_ProdSchedule.Sch7_spins, dbo_tbl_ProdSchedule.Sch7_sheets, dbo_tbl_ProdSchedule.Frames_due_date, dbo_tbl_ProdSchedule.Comments, dbo_tbl_ProdSchedule.Record_date
FROM dbo_tbl_ProdSchedule
WHERE (((dbo_tbl_ProdSchedule.Sch1_date)=[Forms]![frm_ProductionSchedule]![cmbSchDisDate]) AND ((dbo_tbl_ProdSchedule.SpinCoaterNo)=1));

AND WHERE ((dbo_tbl_ProdSchedule.SpinCoaterNo)=2)), etc. Respectively for each subform.

Thanks in Advance!!

John

View 4 Replies View Related

Forms :: Creating Record From Subform - Use One Of Values In Main Form

Apr 5, 2013

I'm trying to create a record for a table that has 2 attributes:

ContainsTracks
+album
+tracks

I have my main form, where the album is determined by a TextBox. My subform has a textbox that lists the tracks (in datasheet view). I have this set up and working fine.At the moment if I try to add a new record by typing a new entry into the subform I get the error: "Index or primary key can not contain a null value". This is because both album and tracks make the composite primary key of ContainsTracks.

My question is, how can I tell the subform to grab the value from TextBox1 in the main form as the +album when I create a new record.I have provided two screenshot that perhaps explain my predicament a bit better

View 2 Replies View Related

Forms :: Using Subform To Add Progress Reports To Main Form Record?

Jan 14, 2015

Basically, I've created a form to track maintenance requests for specific types of equipment. Basically it's like a ticketing system.

Once a user creates the request, I want to use a subform (I guess this is the best way) to let them add data to that specific main form record to track the progress of the request until the repair is made and the "ticket" is closed out.

Do I need to create another table for the "progress reports" (for lack of a better term) or should this be done using some sort of an append query?

I've seen plenty of sample databases where they have a box within a form that looks like a datasheet where these types of "update" notes can be added and then submitted with the click of a button, but I've never been able to get at the code behind it.

View 14 Replies View Related

Forms :: Datasheet Subform Not Updating From Main Form Add Record?

Jun 23, 2015

I have a navigation tab with 6 sections, of the 6, 5 of them are self-made split view with a form view on top and datasheet on bottom and upon adding records through a command button on form view I would like the datasheets to update.

On other forms it would (I believe) update to the bottom of the datasheet, now on the ones I've been banging my head against it either replaces the top record or doesn't show up unless I switch tabs and switch back. From my searches I assume this is in need of a requery...

View 14 Replies View Related

General :: Get A Record In Main Form With Double Click In Subform

Sep 15, 2013

I have a mainform named EMA and a subform named Q_EMO. In the mainform there is one event related to a patient.In the subform Q_EMO there are all the events releted to the patient.I would like to get a record in the mainform EMA when I double click in the record of the subform.

View 12 Replies View Related

Forms :: Main Form Show Record Selected Within Datasheet Subform

Sep 30, 2013

The situation is i have two forms, looking at the same table, but the main table shows more records, I would like to select a record in the datasheet subform and have the main form flick through to the corresponding record.

View 5 Replies View Related

Modules & VBA :: View Main Modal Form Based On Chosen Subform Record

Jul 22, 2014

I have a modal form which has a single record which is then linked to a sub-form on the same modal form. This all works fine and shows the relevant record and sub records but I want the modal form main record to change dependant on the record selected in the subform (which is basically order item history.

I found some code on another site which seemed to work for others but for me I am getting Run-time error 2465 and it doesn't like my reference to 'Me' - is this because it is a modal form?The code I am using is:

Public Function GotoRecord(RecordID As Long)
Dim rst As DAO.Recordset
Dim strCriteria As String
Set rst = Me.RecordsetClone
strCriteria = "ID = " & RecordID
rst.FindFirst strCriteria
If rst.NoMatch = False Then
Me.Bookmark = rst.Bookmark

[code]....

View 1 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

Form Clicking Requires 2 Clicks To Go To Next Record!?!?

Feb 20, 2007

Hey Readers,

I'm using MS OFFICE 2003...MS ACCESS

I am having a problem in my one form where I have to click on the "go to next record arrow" twice before it displays the next record. (even on the "create new record" it requires 2 clicks)

All other forms I have display the next record for only a single click on the arrow.

Is there something unique in the properties of the form in question that needs to be changed so that a single click displays the next record?

Any help would be greatly appreciated.

Thanks,
Duncan

View 5 Replies View Related







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