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 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 am new to access and I recently encountered a double click issue
My form loads perfectly on double click event but it shows the first record instead of selected record.
My search is based on a PersonID but each PersonID has different WorkID that I wish to display on double click but it always shows the first WorkID instead of my selected record
I have tried changing the filters in the form properties but it still doesn't work for me.
Here's my code:
Private Sub SearchResults_DblClick(Cancel As Integer) DoCmd.OpenForm "WorkForm", , , "[PersonID]=" & Me.[Searchresults], , acNormal End Sub
[Searchresults] draws information from my Query
Query information:
PersonID... WorkID... Type......Location 1234..........1............Paint .....Address A 1234..........2............Electric...Address B 1234..........3............Floor..... Address C
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 am using a continuous form and would like my users to be able to change a field background color to a light red by double-clicking. The user would also be able to change it back to white by double-clicking again.
The code I am using (below) changes the field background color for all records. I need my code to only change the field color of the current record and cannot seem to find how to do that. The field name is [System_CurrentStatus].
Private Sub System_CurrentStatus_DblClick(Cancel As Integer) If Me.System_CurrentStatus.Backcolor = vbWhite Then Me.System_CurrentStatus.Backcolor = RGB(234, 154, 160) ElseIf Me.System_CurrentStatus.Backcolor = RGB(234, 154, 160) Then Me.System_CurrentStatus.Backcolor = vbwhite End If End Sub
I have a main Form "Client" that shows details such as Representatives, phone numbers, status, etc. I also have a main report "CRM" that is a nicer summarized table version of all of my Client form entries.
The "CRM" form will be used by others in my office to see what clients we are contacting, etc. What I want to be able to do is have someone open the CRM form first. If they want to see even more specific info (not everything is included in the report, as that would be too messy), I want them to be able to double click the Client's name on the report and be taking to the corresponding entry on the Client form that shows more details.
Right now my code for the Report which is not working is the following:
Private Sub Client_Name_DblClick()'double click on a client name in the reportDoCmd.OpenForm "Client", acNormal, , "[Client_Name]='" & [Client_Name]'this should open the Client Form to the record of the same client that was double clicked on the reportEnd Sub
I have a form which has a tab control on it. The form itself is based on 1 table (tblCustomers). The tab control has 2 pages.
Page 1 shows 6 fields from tblCustomers.
Page 2 of the tab control shows 2 embdedded forms. Those forms are based on queries created from tblCustomers. one shows records with a date entered into one of the fields, the other shows records that have no dates.
What I want to be able to do is when I see a company name in one of the ebedded forms (Page 2), I want to be able to double click that record and it switches me back to Page 1 and shows the the related details of whichever company I double clicked.
I have changed the double click event in the emdedded form and using the builder to create something. I also added a setfocus command as I read about that somewhere (but i have no idea what it does). Through this I managed to get it to switch from Page 2 to Page 1 when I double click, but it only ever takes me to record 1 regardless of which company i double clicked.
i may have this deisgned totally wrong so please feel free to point me in the right direction.
If you click on the main form called frmpatient you will see 2 text boxs one called Primary Insurance the other Called Secondary Insurance
Above those text boxes are to hyper links which open the list box
What I'm trying to do is if a user double clicks the name of the Insurance From the List Box it will insert that Name of the Insurance Into either The Primary Insurance or Secondary Insurance Text Fields
I do not Want to Use combo Boxes because I have about 1,000 Insurances in my database.
I have a continuous form, with data entry fields in both the form header and the detail section.
I've attached an "On Exit" event to the ProdQty field in the detail section. The prime function of the event code is to run an update query on the table (which is the data source for the form).
The code executes properly (update query runs successfully and form refreshes) when I Tab out of that field. It also executes properly when I use the mouse to click on another field in the detail section.
However, when I use the mouse to click on a field in the form header or form footer sections, the On Exit code does not execute properly.
Here's the On Exit Sub:
Private Sub ProdQty_Exit(Cancel As Integer) On Error GoTo ProdQty_Error
If (Int(Me!ProdQty) <> Me!ProdQty) Or ((Me!ProdQty / Me!LDU) < 1) Or (Int(Me!ProdQty / Me!LDU) <> (Me!ProdQty / Me!LDU)) Then Me.ProdQty.BackColor = 255 Me.ProdQty.ForeColor = 16777215 Beep MsgBox "The quantity you entered is invalid for this product." & vbCrLf & vbCrLf & "Please check the LDU (least divisible unit) and enter a new quantity.", vbExclamation, "Quantity Error" DoCmd.GoToRecord acActiveDataObject, "Order Form", acPrevious DoCmd.GoToRecord acActiveDataObject, "Order Form", acNext DoCmd.GoToControl "ProdQty" Exit Sub Else Me.ProdQty.BackColor = 255 Me.ProdQty.BackColor = 16777215 Me.ProdQty.ForeColor = 0 DoCmd.SetWarnings False DoCmd.OpenQuery "Update Product Qty in Current Order", acViewNormal, acEdit Me.Requery Me.Refresh Me.Repaint
I have managed to populate a treeview with some menu items I required and it looks great but I now need to get it to do something. How do I get a tree view value (selection) to act as a variable in routine. e.g. if my tree look like this.
Menu ¦ - Compaint management I I----My compaints
When I "double click" on My Complaints I want it to a open a specific form. One I know how to do one action I should be able to figure the rest out for myself.
Is it possible to load the data in input from by double clicking on data from list box ?
I have single form on which both input form and read-only form is present. as i used visible property to display or not accordingly.
User enters the data from input form. (It has been done)
User go onto read only form where combo box and list box. from drop down values load into list-box. (It has been done)
Now double click on any record then it should re-directed on input form with loading the data in editable mode for updation purpose. ???? (How this step will be done) ?
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 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'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?
Trying to pull information from a text box on double click to populate a combobox on another form...
keeps coming up "type mismatch"
I call lngAccount as recognised on mouseover... ("Business Account" is the value I want)
I can't get it to work!
For info, the form I'm calling from is a subform located FrmMainMenu/FrmAccountsMainMenu and the control source is [Account]
the form I wish to populate in on FrmTransactions (it is a main form only) and the combobox is cboaccountselect - **I've seen the obvious mistake with no reference to this whatsoever, corrected it, and still not working**
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".
I have a continuous form with a button 'Cmd1' & a textbox 'txtMail' which is set to visible no.
When the user clicks Cmd1 - then txtMail becomes visible.
I can do it using vba on the buttons click event but when it executes txtMail for all the records become visible.
How do I use a button's click event on the form's current record - Private Sub Form_Current() so that when the user clicks Cmd1 on the current record only txtMail for that record becomes visible.
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 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 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 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 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 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 )
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?