Forms :: Double Click On A Row In Subform And Open Related Table Using Common ID
Jun 21, 2013
I want to Double-Click on a row of a subform to open a related table/form that are connected with a common ID. So far, I tried the following code, but it does not work.
Private Sub PackingSlipT_subform_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ProductT"
stLinkCriteria = "[PackingSlip_ID]=" & Me.PackingSlipT_subform.Column(1)
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
I all I have looked in the forum but can't find anything that matches I have a form containing a subform called eventswich shows some events in date order, as I have too many information on the table events I could not put them all in the subform if not only the essential information, what I need is if I double click on the field "DATE" it would open the "EVENT" form and show me all the information contained in the record.At the present time I have the filed SELECT RECORD set to NO on the form properties! Hope I have given a good explanation!!!! Thanks Marco
I have a text box on my form which I use to attach hyperlinks to pdf's, this works great but after inserting a hyperlink nothing is displayed in the text box to show it has been linked unlike using attachment, the only way I know if that a hyperlink is placed is to right click and go to hyperlink and then open, is there a way to show the link on the text box and just double click on it to open the pdf. I am trying this as the size of the database will far exceed the 2gb that access allows if I just use attachments , even if I split the database (over 10000 pdfs )
I am trying to create a proposal log for my company to make things easier to track. I have made a multiple items form to list the proposals. I want to be able to double click the record to open up another form (that i have already created) that shows the information from the proposal table and the proposal details table. So.....
I want to double click the field named "Proposal Name" and have it open up to form i have called "proposals details form".
Hi all I have a form with inserted a subform, I would like to double click on the field "date" on the subform to open the relative complete record on the original mask! Thanks M
greetings all..i have tried to use an old database template i had and re-work it for my new client..basically the user types a ref no into a search box.. there is a text list that is narrowed down to the chosen item as they user types..then they double click on the item in the list and it opens in the main form..this is how it should work.. i think im pretty close but im gettin a few problems.. i would be very grateful if someone could have a look at it...the form i want all this to happen on is called MAINFORM.. the database is very simple.. one table.. one query.. thats it..thanks..
i will show you my list box code. i would like to make it possible for my user to double click on an item in the list and it opens that record in my 'zEnquiry' form (which has the correct named fields to display the data already)
i had some double click code but i deleted it, and now ive forgotten which post i found it in.
here is the code for my listbox
Private Sub QuickSearch_AfterUpdate()
DoCmd.Requery Me.RecordsetClone.FindFirst "[Enq_Forname] = '" & Me![QuickSearch] & "'" If Not Me.RecordsetClone.NoMatch Then Me.Bookmark = Me.RecordsetClone.Bookmark Else MsgBox "Could not locate [" & Me![QuickSearch] & "]" End If
I have a few search forms that, when search parameters are entered, a continuous subform displays the results (summarised...not all fields show).
I want to be able to double click a field in any given record, and have it open in a form allowing editing of the record.
I know I need something in the OnDoubleClick event of the text box I want to double click, which would then open the form, but I don't know what code to use.
For the sake of argument, I want to double click on the txtSerialNumber text box to do it, as this is a unique field.
I have the following code that I have been trying to get to work:
Private Sub txtSocNumber_DblClick(Cancel As Integer) On Error GoTo Err_txtSocNumber_DblClick
Dim stDocName As String Dim stLinkCriteria As String
stDocName = "FrmApplicantFullDetails"
If IsNull(Me.txtSocNumber) Or Me.txtSocNumber = "" Then MsgBox "This record is empty", vbInformation, "No Data" Me.txtSocNumber.SetFocus Else stLinkCriteria = "[ApplicantID]=" & Me![InvestigatorID] DoCmd.OpenForm stDocName, , , stLinkCriteria End If
Exit_txtSocNumber_DblClick: Exit Sub
Err_txtSocNumber_DblClick: MsgBox Err.Description Resume Exit_txtSocNumber_DblClick End Sub
I have the following two tables:
Applicant and Investigator
Applicant: ApplicantID InvestigatorID etc
Investigator: InvestigatorID etc
The relationship is setup as 1 investigator to many applicants.
What I am trying do is this. I have form with a subform in it. In the subform there is applicant info IE SS# LName, FName and that is it. What I want to do is be able to double click on the SS# have the form "FrmApplicantFullDetails" open so you can view the work up on the applicant or edit info on the applicant.
Am I going about this the right way with the above code? Or is there something else I am missing in the code or is there code out that will do what I am looking for that is easier?
I have a Project form, which holds StockArtProduction_Subform in datasheet view. I need for them to be able to click on the ID in the StockArtProduction_Subform datasheet and it open a single view form (StockArtProduction) with the correlating ID.
Ideally, it would also work for new entries in the StockArtProduction_Subform, but the StockArtProduction form would have to "auto populate" (did I use it right?) with the ID of the currently open Project form.
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.
Hi all, I am new to microsoft access. I've got one question that can't solve. I am making database with several items. Under each item, there got different field lists to fill in. So I made several forms for each of them. In main form, I put one combo box to choose the item and one common button. So how can I write the code to open the several different forms,one at a time, by clicking one button according to the value that is chosen from combo box?? thank in advance.
I need created a form frmFlight this form has two fields called DEP and ARR what I need is when the users types the 3 letter code in the DEP or ARR field if these do not match the any records in field AirportCode in the table tblAirport will highlite a error. Also I need to double click on the field DEP or ARR in the frmFlight and open the frmAirport with the specific record. Example if one of the records contain LCY by double clicking it will open the form frmAirport displaying the LCY record.
I am having a problem in my access database. I have a a form called Compliance Register. When this window opens it lists all of the requirements of a particular department. There is an ID and Source ID(this field can contain the same number such as multiple 17's). The descriptions match up to what is supposed to be shown. However when I double click on the item, it brings up a Compliance Status window. This is where things go wrong.
It shows the status listed as the first Source ID that matches the number, but does not seem to also be matching up the ID as well It must match both ID and Source ID since Source ID can have the same number multiple times down the list..
Here is what is under the Event Procedure for the double click.
Private Sub ListRequirements_DblClick(Cancel As Integer) On Error GoTo Err_ListRequirements_DblClick Dim stDocName As String Dim stLinkCriteria As String stDocName = "Compliance Status"
[Code] ......
Under stlink criteria, i need it to not only pull the ID, but it has to have a "AND" Source ID. I need it to pull the record that matches BOTH numbers.
I have a table that has the list of "Project design" choices, and I enter in there the choices that a project can be. I then have that table related to a junction table that has the "Project design choices" linked to the "project code." Anyway, I THOUGHT that one of the bonuses to using Access was that if you see something spelled wrong, you could fix it in one table and it would fix it everywhere. However, when I see that I spelled something wrong in "TBLProjectDesignChoices" and I want to fix it, it tells me that I can't because it contains related records.... ok so, if this is bad design.. I may have to leave it because I have spent countless hours doing data entry for this..
I'm stuck on a portion of a form that displays members attending and not attending a specific event. I've got some of it working but others not.
1. Removing items from a table and updating a listbox 2. Changing the Event selection from Next Record to a combo box.
The code that I have in the two list boxes are as follows:
Code: Private Sub Form_Current() Me!lstNotAttending.RowSource = "SELECT DISTINCT Members.MemberID, Members.txtLname, Members.txtFname FROM Members " & _ " LEFT JOIN MemberEvents ON Members.MemberID = MemberEvents.fk_MemberID" & _ " WHERE MemberEvents.fk_MemberID Is Null OR MemberEvents.fk_EventID <> " & Me!txtEventID & _ " ORDER BY Members.txtLName;" Me!lstAttending.RowSource = "SELECT Members.MemberID, Members.txtLname, Members.txtFname FROM Members " & _ " LEFT JOIN MemberEvents ON Members.MemberID = MemberEvents.fk_MemberID" & _ " WHERE MemberEvents.fk_EventID = " & Me!txtEventID & _ " ORDER BY Members.txtLName;" End Sub
The code I have working for adding a member:
Code: Private Sub lstNotAttending_DblClick(Cancel As Integer) CurrentDb.Execute "INSERT INTO MemberEvents(fk_MemberID, fk_EventID) " & _ "VALUES (" & lstNotAttending.Column(0) & ", " & Me!txtEventID & ");"
Me!lstNotAttending.Requery Me!lstAttending.Requery End Sub
I know the code for removing has to start with REMOVE FROM. I just don't know the syntax.The combo box has no code.I'm assuming the Requery options aren't working properly for the listboxes
I want to add an event on Form Header when double click it will filter the values, which i did with macro, but could it happen on second time double clicking it it refreshes whole as original?
I have a datasheet view where the 1st field has an event.
Private Sub WorkOrder_Click() DoCmd.OpenForm "Engineer Entry Update", WhereCondition:="[Workorder]=" & Me.WorkOrder End Sub
The form "Engineer Entry Update" opens but the require data in not there until I press the WorkOrder_Click() again.Then it is populated. Why do I have to double press?I would like a single click to open the form a populate.
I have a Contacts subform and would like to be able to double click to fill addresses, and details from the previous row...every person in our database even those living at the same address needs thier own record.. and since we only need to fill up to 5 records and review them, double clicking on the first name to fill up the next row with the previous addres phone number ect would be grand.
I am assuming we could fill out the new Full Name and double click on it to get the previous record filled to the new one. Don't really want to work with a query unless needed, but I have a little vba understanding.. how do I code this to make it work?
I'm in desperate need of a (simple I guess) code to allow me to send records from my listbox to a new form. Scenario goes as follows:
I use cascading combo boxes to narrow my available choices and finally end up with a listbox presenting the records filtered through cascading process. Now, I want to double-click on a record and load a new form with all this record's fields.
This is the code used to populate the listbox:
Private Sub FilterTypeList() Dim strRS As String ' Filter the list box appropriately based on the combo box selection(s) strRS = "SELECT qryTaxonomy.Type, qryTaxonomy.Article FROM qryTaxonomy"
[Code] ....
What is the code to open a form with the double-clicked record's fields, as described above?
Is there a keyboard shortcut that simulates the double click.
In my Sectionfrm I have a command button that opens my Ordersfrm. Because I use the Ordersfrm for reasons not always associated with the Sectionfrm I do not automatically populate the SectionID (textbox) in the Ordersfrm with the SectionID from the Sectionfrm.
When I want to link an order to a (building) section I double click the SectionID field in the Ordersfrm which in turn runs VBA code that copies the SectionID from the Sectionfrm to the Ordersfrm.
As I tab through my form I find it annoying to move away from my keyboard to the mouse to double click the SectionID, so the question is:
Is there a keyboard shortcut that simulates the double click to run the VBA code?
I would like to select a record on an already open form called "form_candidates" using a search facility but can't get it to work.
In "form_candidates" the data settings are set to "yes" (filters/edits/deletions/additions) and data entry is set to "no". On opening, the form is set to go to a new record.
In this form I have a button that opens a record search form so both forms are now open. I enter the first few letters of the surname into a text box, press a button and the listbox is populated.
In the doubleclick event of the list box I have the following code:
Dim CandID As Integer CandID = Me.List4.Column(0) DoCmd.OpenForm "form_candidates", acNormal, , "forms![form_candidates]![Cand_ID]=" & CandID
So I double click on the record, the candidate form is being filtered but the record isn't being shown.
I have a attached a sample database to show you my problem the form "stores1" is the navigation form . in side that I have 2 subforms.
the first form I have a macro in it that when you double click it ( say the first line ) the stocklist file will appear on the part that I double clicked on IE 5096B02066 this did work and does work in the old access I have but now I put these forms into the navigation form I cannot get it to work,
I am having this problem on many forms even if I try to put a text box into the navigation window that ref a field on one of the subforms.