Double-click Name To Add To Adj. Listbox
Nov 1, 2004
I have a list of companies in a table which Is being accessed through a list box. I wanted the user to be able to double-click on the name of a company from that long list and then for that selection to show up on an adjacent shorter list box which in turn will be used for a search. How can I do this? Another option would be to drag and drop the name from on list to another.
View Replies
ADVERTISEMENT
Jun 2, 2005
This is probably failry simple if you know what you're doing, but I don't know what I'm doing....
I have a form (Purchase Orders) and on that form there is a search button to allow the user to search the customers table by customer name. When the user clicks the search button a search form opens and the search results (customer number, first name, last name) populate a list box named "lstCustInfo". How can I set the list box double click event to return the customer number, first name and last name to the Purchase Orders form? To make it even more complex I would like to return the data in two fields: customer number and LastName, FirstName. The problem with returning the results in two fields though is that I need to be able to break it into three to save it in the customers table because the table has a place for Customer Number, First Name and Last name.
Does anyone have any suggestions? Is there a better way to do this than returning 2 fields and having to break it back into 3 to store?
View 6 Replies
View Related
Jun 27, 2005
Hi everyone!
First, I want to say I would REALLY appreciate any help I could get with this problem. Let me lay out the details.
I DO NOT, DO NOT, DO NOT know the first thing about programming for ms access. I am an absolute novice, no exaggeration at all. I was a liberal arts major in school!!!!!
Here's the thing: being adventurous and all, about 2 years ago a co-worker and I were fiddling with databases to try and help out our employer keep track of dispatching his equipment for his business. With a little too much time on our hands, before we knew it, our database became fairly complicated, for such novices. A kind gentleman on this forum did us an enormous favor, and programmed a search form for our database. you could enter any or all of the id #'s for various equipment, and it would pop up in a list box. Double-clicking the listbox would open the particular record you were looking for.
Fast-forwarding to now, I'm trying to create another database to keep track of our inventory while while various equipment moves in and out of our yard. I have tried using the old search form as a foundation to create a similar search form for this db. I think I actually have it (kind-of) working! You type in a container number, and the record should pop up. which is a miracle all its own.
problem is, is that when you doubleclick the selection in the list box, I receive the following error:
"Run-time error '3075':
Syntax error (missing operator) in query expression '[ShipID] = '.
I click debug, and visual basic brings me to:
DoCmd.OpenForm "Inventory Table Form",,, "[ShipID] = " & Me.lstInfo
I don't know what to do! I'm sure it must be something painfully simple or obvious, but I'm really stuck & would appreciate any help.
Also, I would really appreciate any advice on this: I'd like to also be able to search by chassis # in addition to container number, but i don't know how to do it. no big deal, though. THANKS SO MUCH!!
p.s., I've attached the db. please let me know if you can open it ok
View 1 Replies
View Related
Mar 2, 2006
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
End Sub
View 1 Replies
View Related
Dec 17, 2006
the user searches records and they are filtered..http://www.londonheathrowcars.com/searchform.jpghttp://www.londonheathrowcars.com/searchquery.jpgand when they double click i want the record to open in this form..http://www.londonheathrowcars.com/showform.jpghttp://www.londonheathrowcars.com/showquery.jpgtrying to put this code on my listbox but gettin the openform cancelled 2501 error on the bold line.. anyone see why?Private Sub QuickSearch_DblClick(Cancel As Integer)Forms("searchform").SetFocusForms("searchform").RecordSource = vbNullStringDoCmd.OpenForm "showform", , , "[jobref] = " & Me![QuickSearch].Column(0)End Subnote:on the search form.. the form has no record source.. the listbox has the record source of the searchquery..also on the show form.. the form has the record source of the showquery.
View 8 Replies
View Related
Jun 25, 2013
I have an access form which i have turned of menus, navigation and shift key. What I am looking for is to have buttons on my form to allow users to create and delete queries from my form. I already have a listbox that shows all the queries and runs them when a user double click on them.The codes needs to run in access 2007-2013 in both 32 & 64 bit versions.
View 3 Replies
View Related
Dec 26, 2014
I want to double click on one of listbox item and change it without opening any other form.
View 6 Replies
View Related
Sep 26, 2012
I currently have a listbox. (list32) that is populated with results of a query. I would like to doubleclick on an item and have it open a form that displays the listbox record i clicked on and a "notes" field. Its my understanding that the table fields are limited to 255 chars so i was curious if I could make the notes field reside somewhere else. I will need the notes able to be edited, specific to record entry, and then saved on exit. Is this doable?
View 2 Replies
View Related
May 4, 2014
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?
View 6 Replies
View Related
Aug 22, 2014
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) ?
View 9 Replies
View Related
Jul 27, 2015
In the past a Teacher would manually create a Form (Student Form) containing Student information, (Name, Gender, Birthdate, Homegroup) as well as additional issues on the student. This would all be saved into a table.
I would like to change this manual process of typing in individually to each text box, therefore, I have been able to run a report from a external program that obtains (Name, Gender, Birthdate, Homegroup). This saves as CSV and I am able to import into a separate table within the database.
This works no problem.
What I have set-up is a form that contains a listbox this contains the Student name and Homegroup from the imported table contents. Again this works fine.
What i would like to do is when a student is selected from the listbox and dbl clicked on, how can i make information (Name, Gender, Birthdate, Homegroup) populate the textboxes in the Student form that the teacher previously used? could this be an update query where the imported table information will then go into the Student form? If so, how can I tell the dbl click of highlighted name is the data i want to populate?
View 1 Replies
View Related
Jan 3, 2014
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.
View 3 Replies
View Related
Mar 14, 2014
On double click event in the listbox, code as below:
Code:
Private Sub ListBox_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmTransactions"
stLinkCriteria = "[BinNumber] =" & Me![ListBox]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
When I double click any row then it show Run time error 3464.
View 3 Replies
View Related
Apr 6, 2006
Morning, all...
Hoping someone can help me with this. I have a form (one-side) with a bound continuous subform (many-side). I have a second unbound subform, also continuous, which is used as a reference only (no data entry) to select the record to be added to the bound subform. Is it possible to set it up so that, when the user double clicks on the pk from the unbound subform it adds that pk as a new record on the bound subform?
Thanx in advance for your help with this ;<)
Karen
View 2 Replies
View Related
Nov 2, 2007
I want to lookup a list of employees (in a form) and by double clicking a name listed, have that name pasted into another form or Sub form to add details to it.
I want to select a number of employees and add info such as attending a training session, plus the topics covered, instructors name etc. I want to add this info once but relate it to a number of employees who attend the training???
View 1 Replies
View Related
Jan 17, 2005
Hi,
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.
any ideas?
thanks in advance
View 1 Replies
View Related
Mar 24, 2008
I have a database that is used in academic labs by student workers. In order for them to open the database they have to double click on the actual file via a network folder. This works for all but one computer. It will only open the file if they open Access first. It seems very strange to me seeing as other computers in that same lab (all the same image) will open it via double clicking. I have googled till my eyes bled but haven't found a solution. Any help will be greatly appreciated!
View 5 Replies
View Related
Dec 10, 2006
I have a query with following sql
SELECT tblTrip.PaySlipReference, Sum(tblTrip.NDays) AS TotNDays, Sum(tblTrip.FlyingTime) AS TotFlyingTime, Sum(tblTrip.DutyTime) AS TotDutyTime, Sum(tblTrip.TAFB) AS TotTAFB, Sum(tblTrip!DutyPayRate*tblTrip!TAFB) AS TotDutyPay
FROM tblTrip
GROUP BY tblTrip.PaySlipReference;
I cannot find a solution for 2 questions:
1 - I need to count the number of records it has grouped as PayslipReference
2 - I need to double click on the field PaySlipReference and obtain list of all the records related to the PaySlipReference wich I have doubleclicked
Thanks
Marco
View 6 Replies
View Related
Feb 12, 2006
Please see attached database
Main form is frmPatients
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.
Please Help
View 3 Replies
View Related
Jun 26, 2006
Hello,
I currently have a combo list on a purchase order form that has the following event procedure(s) in it so as to open the inventory window as needed to add/edit inventory.
Not in List:
Private Sub Combo55_NotInList(NewData As String, Response As Integer)
MsgBox "ERROR: ITEM not in list. Double-click this field to add an entry to the list."
Response = acDataErrContinue
End Sub
On Double-Click:
Private Sub Combo55_DblClick(Cancel As Integer)
On Error GoTo Err_Combo55_DblClick
Dim lngCombo55 As Long
If IsNull(Me![Combo55]) Then
Me![Combo55].Text = ""
Else
lngCombo55 = Me![Combo55]
Me![Combo55] = Null
End If
DoCmd.OpenForm "INVENTORYITEMSform", , , , , acDialog, "GotoNew"
Me![Combo55].Requery
If lngCombo55 <> 0 Then Me![Combo55] = lngCombo55
Exit_Combo55_DblClick:
Exit Sub
Err_Combo55_DblClick:
MsgBox Err.Description
Resume Exit_Combo55_DblClick
This works GREAT on other forms I have however, on this particular form it gives me the following error:
ERROR:
You have tried to assign the null value to a variable that is not a variable data type.
I have started from scratch several times....can anyone help? Is there anyway to add a button to the form to open the inventory form and then requery the combo box when closing the inventory form?
Thanks,
Dianne
View 5 Replies
View Related
Jul 16, 2006
:mad:
Hi all I cannot get it to work, I have a combo box that on double click should open a form to add the item with all the relevant details, when ài double click on th combo box it does open the form but not in a add mode, it actually opens it on the first record of the DB, th vb instruction is as following:
Private Sub CP_DblClick(Cancel As Integer)
On Error GoTo Err_CP_DblClick
Dim ImgEventTypeID As Long
If IsNull(Me![CP]) Then
Me![CP].Text = ""
Else
IngEventTypeID = Me![CP]
Me![CP] = Null
End If
DoCmd.OpenForm "Crew Members NV", , , , , acDialog, "GoToNew"
Me![CP].Requery
If IngEventTypeID <> 0 Then Me![CP] = IngEventTypeID
Exit_CP_DblClick:
Exit Sub
Err_CP_DblClick:
MsgBox Err.Description
Resume Exit_CP_DblClick
End Sub
Can some one help me:)
View 1 Replies
View Related
Aug 8, 2006
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
View 4 Replies
View Related
Jul 18, 2005
I have created two forms one call patient info and another called insurance on patient info form I have a text box called insurance. I want to create a event procedure whereby i could double click the box and view insurances added to database. once appropiate insurance is chosen it will display insurance name in box, any Ideas on writing code for this.
View 1 Replies
View Related
May 15, 2006
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..
View 2 Replies
View Related
Dec 11, 2007
HI all
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.
Thanks everyone. :-)
View 2 Replies
View Related
Sep 13, 2005
Private Sub tbxPoor_DblClick(Cancel As Integer)
Me.TtbxPoor= Me.TtbxPoor+ 1
End Sub
This simple event on double clicking a field on my form increments the number in the field by 1. There are 10 fields in all where I want the user to be able to do the same. Is there an elegant way to code this event for all those fields using one routine or is it best to add the event to each field?
View 10 Replies
View Related