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 Replies
ADVERTISEMENT
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
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
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
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
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
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
Sep 20, 2012
I have only 1 table that im working with I simply want to have a form that runs a search on one of the fields and returns the results.
This is what I have:
1 Table
ID : Autonumber
ProblemType : Text
Technician : Text
I want to create a form that has a main form with a text field that i can input a string of text and run a search on the problemtype field. And return all the results in the subform with based on keyword that was inputed in the form above. I want the results to display Problem type and Technician fields. What is the best what to do this?
View 1 Replies
View Related
Dec 2, 2013
I'm trying to search a for string within a subform to find information stored on the mainform to which the particular subform belongs.
The problem is that the subform is generated from a query which uses a number from the main form to generate.
So the subform record is only generated when the correct mainform record associated with it is loaded.
Now to solve my problem I've made a new query that brings up ALL the results that could be generated by the main form and from that I can search to find my search term I'm after and read off the ID number to tie it back to the mainform.
But all of this is done manually, I want a way to do all this using VBA in a way that the user can't edit any records as they are doing it.
View 3 Replies
View Related
Jun 5, 2014
Input box Search problem. I have been using the following to find a record in my frmMain using an Input Box:
Private Sub cmdClientIdSearch_Click()
'Searches for Client by ID number
Dim rs As Object
Dim strCriteria As String
strCriteria = InputBox("Please enter Client ID" & vbCr & "Do not type leading zeros")
[Code] ....
It works great if I run it from a command button from frmMain. But, if frmMain is open and I run it from a command button on my switchboard, I get the following error message:
Run Time error 7951. You entered an expression that has an invalid reference to the Recordset Clone Property. I tried inserting a command to open frmMain in the first line, even before the two Dim statements, but I get the same result.
View 6 Replies
View Related
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
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
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
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
Jul 1, 2013
What i'm trying to do is add a new record to a subform. The problem is, I couldn't use a subform based on a table in order to achieve this. I needed extended information for it to be useful, so I made the visible part of the subform based on a query instead.I'd like to add a button that adds a new object to the main job. I'd like the adding of that button to call a new form allows you to fill in the information for that object (this called form actually contains 5 subforms to populate all the data of the object). That form works.
What I need is for the button to call the 2nd detailed form AND create the necessary entries in the project/object junction table.The idea as it is now is a button on the main form, but if it was possible to do so via continuous form in a subform, that's doable.
View 11 Replies
View Related
Jun 25, 2013
I have two tables called "tblFundingBodies" and "tblGrants". I have a form that allows me to view all the records for each of the funding bodies. By this I mean, it shows information on a funding body but to see information on the next funding body, I must click on the next record button. Just wanted to clarify that it isn't in the form of a table.
This form also has a subform in the same format that shows each of the grants that funding body has provided. When I select the next record from the main form, it will show me the grants from the company in the next record. The field that has the funding body is a text box.
I want to be able to add a seach facility to the main form that allows me to search for a funding body and get back exactly what I have described above, but just the details on that funding body/grants. In other words, I want the form view of the funding body I search for with the sub form of the grants from that funding body, not in the form of a table where you can see them all at once, I want to be able to click through each grant in the sub form.
View 6 Replies
View Related
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
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
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
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
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
Sep 27, 2013
i have a main form for customers and a subform for sites which is set to locked so its displayed as just a list. I have a button on my main form to add a new site for the current customer displayed..How can i get the Main form '1CustomerDetails' with subform '2SiteList' to automatically refresh one i've clicked the save button on another form.
View 1 Replies
View Related
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
Mar 15, 2013
I have this form that contains subforms to hold different types of infomation for different clients. At the top of the form it has the case #, first name, last name, and then a tab element in which each of 6 pages (tabs) holds subforms for other information associated with the client.
I have a table that holds only client number and name.Then each of the six subforms operate off of a table, and all the tables are connected through relationships using client number, first name, and last name.
How could I make the subforms autofill their cooresponding tables using the case #, and name fields from the main form without having to repeatedly input the client #, names for each tab/subform?
View 4 Replies
View Related
Apr 21, 2015
I have a form that shows information on a person (think first name and last name) at the top and contains tab controls that hold subforms each containing a different set of info about that particular person. Ex: for person 1 the main form will display the persons first and last name as well as show the subject tabs. as you click on each tab you should see the information that pertains to that person. I would like to step through each ppeson one at a time using the horizontal record arrows (eventually I will change this process to using forward and back buttons) on the main form with the persons names changing as well as the information in the subforms changing to match the person on the main form. I can step through each separately (main form and each subform) but I cant get the subforms to change information when the main form changes persons. Seems simple enough but I cant get the subform to change when the main form changes. They are not connected. This is for an Access class that I am taking and we use Access 2013.
View 2 Replies
View Related
Jun 27, 2013
All using 2010. I need to filter a subform from the main form.
Code:
sfrmMedCInfo.Form.Filter = "[SSNum]= '" & cboSSN & "'"
sfrmMedCInfo.Form.FilterOn = True
It's throwing an error: Variable not defined pointing to sfmMedCInfo. why do I need to declare the subform and how?
View 3 Replies
View Related