Duble Click On List Box To Open Form And Subform

Apr 7, 2008

I have the following code attached to a form:
Private Sub Go_To_Project_Click()
On Error GoTo Err_Go_To_Project_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Project Main"
stLinkCriteria = "[R&D ID#]=" & Me![lstsearch]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Go_To_Project_Click:
Exit Sub
Err_Go_To_Project_Click:
MsgBox Err.Description
Resume Exit_Go_To_Project_Click
End Sub

Private Sub txtsearch_AfterUpdate()
Me.lstsearch.RowSource = "Select [R&D ID#], [SKU#], [Project Name], [Construction level], [Manufacturer], [Hobbico Status], [R&D Work By], [Product Manager], [Desktopper]" & _
"From [Project Main]" & _
"Where [Project Name] like '*" & Me.txtsearch & "*'" & _
"OR [SKU#] like '*" & Me.txtsearch & "*'" & _
"OR [R&D Work By] like '*" & Me.txtsearch & "*'" & _
"OR [Product Manager] like '*" & Me.txtsearch & "*'" & _
"OR [Desktopper] like '*" & Me.txtsearch & "*'" & _
"OR [R&D ID#] like '*" & Me.txtsearch & "*'"
Me.lstsearch.Requery
End Sub


Private Sub Exit_Search_Click()
On Error GoTo Err_Exit_Search_Click
DoCmd.Close
Exit_Exit_Search_Click:
Exit Sub
Err_Exit_Search_Click:
MsgBox Err.Description
Resume Exit_Exit_Search_Click
End Sub

Basically a text string is entered in the txtbox and a list of matching records shows up in lstsearch box. One selects the desired record in the lstsearch and clicks on the "Go to project" button and the appropriate form (aka "Project main") and subform (aka Project History) open up with the desired record and record history.

What would I need to add to lstsearch so the users can double-click on the record to open it instead of selecting it and clicking on the "Go to project" button?

Thanks

mafhobb

View Replies


ADVERTISEMENT

Open A Form On Double Click From A Subform

Aug 16, 2006

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

View 9 Replies View Related

Modules & VBA :: Subform DS Click Field To Open Tab On Another Form

Apr 19, 2015

How do I reference a subform DS field to open up a tabbed form on another subform.

Here's what I have.

field one on the Sub DS opens up tab one on another form, as does field two on DS open tab two on another form.

but..

how can I click on "any" field on the DS, run an IF statement, and it checks if that record on the Datasheet, contains information in regards to, IF field one OR field two contains any data, and opens the tabbed form respectively on the other form?

View 3 Replies View Related

Forms :: Click On ID In Subform Datasheet To Open Single Form View

Apr 3, 2014

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.

View 14 Replies View Related

Forms :: Open Form To Show Full Details When Double Click On Subform

Jun 16, 2015

I have a subform 2SiteList (Datasheet View) with the field SiteName... i also have another form SiteDetails.

if possible i would like to be able to double click on a SiteName on the subform and have the SiteDetails form to open to show the full details.

View 1 Replies View Related

Click On A Record From A Continuous Subform To Open A Report?

Sep 5, 2013

I have a form called GetdataFrm. Within it i have a combo box that filter a query. When the combo filters, it populates a continuous subform called GetDataQrysubform. GetDataQrysubform look like a table that contains this Jobcode information:

EmployeeID Jobcode CardAccess Folders Software

When I filter the GetDataFrm form, I want to be able to click on a Employee's EmployeeID number from a single record in GetDataQrysubform and then a form called SingleRefrm would pop up taking me to that record.So far I have a event procedure coded to open up SingleRefrm, when the EmployeeID field is clicked but its not working. The code looks like this:

Code:

DoCmd.OpenForm "SingleRefrm", acNormal, , "EmployeeID = '" & Me.EmployeeID & "'"

View 9 Replies View Related

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

View 14 Replies View Related

Set A Form To Automatically Open On Click

Aug 30, 2013

When you click on your database icon to open up your database, is there a way I could set a form to automatically open ....

View 2 Replies View Related

Double Click A Record To Open In A Form

Jul 11, 2006

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.

Thanks.

View 7 Replies View Related

Need Help With Double Click Open Form Code

Dec 14, 2006

Hello..

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?

Thanks
R~

View 5 Replies View Related

Forms :: Double Click Record In One Form To Open New Form?

Jan 27, 2014

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".

View 3 Replies View Related

General :: How To Open Another Database On Button Click At Form

Dec 11, 2012

i want to ask is there any way to open another access database using when click button at form.. for example i have tracking.accb then at my switchboard form, i would like to have a button that can go to another access which is borrow.accb. can these possible for me to do it..?

View 3 Replies View Related

Open Another Access Database When Click Button On Form

Dec 11, 2012

I want to ask is there any way to open another access database using when click button at form.. For example i have tracking.accb then at my switchboard form, i would like to have a button that can go to another access which is borrow.accb. Can these possible for me to do it..?

View 4 Replies View Related

Forms :: Datasheet Form - Click Specific Record And Open

Apr 10, 2013

I have created a Datasheet Form which when opens shows lots of records. I was looking to see if there was a way that if i clicked on a specific field name within a record it would open a new form with all the information of that record only.

View 5 Replies View Related

Forms :: Open Search Form With Mouse Click On Button

Jul 17, 2013

How to open a search form with a mouse click on Button_Search

My idea is to pop up a form where user can enter the search text and select the required name and get back to the old form with all details about the entry. This form alone is workign fine. I want to call it in a mouse click. and pass the data back to old form.

View 7 Replies View Related

General :: Click On Datasheet To Open Specific Record In A Form

Jul 16, 2012

I have two forms. One is a datasheet. One is a form with a default view of Single Form (which contains combo boxes).I want to have the user select (click) on a record in the datasheet and have the second form open to that record. The datasheet form acts as an advanced search on two title fields.I tried the open form macro but I dont know how to have to second form open to a specific record.

View 9 Replies View Related

Modules & VBA :: Click Event To Open A Form And Select Record Corresponding To Value In Unbound Text Box

Oct 29, 2013

I have some code for a button on click event to open a form and select the record which corresponds to a value in an unbound text box. The code is:

Private Sub Command25_Click()
On Error GoTo Err_Command25_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmOpenPatientRecord"

[Code] ....

This works fine when I put in a 10 digit NHS number but opens a blank record when I enter a four digit or six character/digit PatientNumber. Both patient number and NHS number are text fields in the underlying table.

View 14 Replies View Related

General :: Click On List Lookup Employee / Select ID And Then Form Will Fill In Rest

Nov 6, 2012

I have a form, "Update Employee Information" that allows me to navigate through records and change data like name, adress, etc. I would like to know how to create list (or autofill) so that it won't take long before finding an employee.For example: I have a Employee ID and would like to search on that so the form can fill in the rest of my information. I have thought of two methods that I like:

(1) Click on a list "Lookup Employee", select ID and then the form will fill in the rest

(2) Without clicking a link, typing in the ID in the form and the rest of the data gets filled in.

View 5 Replies View Related

Sending Click Event On Subform To Main Form

Oct 24, 2004

This may be a really simple problem but it has me stumped. Working in Access 2002, I have a form with a subform (continuous). When the user clicks on a textbox in the subform, I need to capture the value and pass it to the main form so that it can be used to create a filter for yet another subform (not nested) on the main form. How could I accomplish this? Thank you in advance!

View 3 Replies View Related

Click To Trasfer Data In Field From A Combo Box In One Form To Another Subform

Nov 26, 2007

Hi,

I have a form build up with a subform in access 2003. Then I have an Insert button on this form which when clicked opens another form which is build up with a combo box. Now, when I select a field for example (Student_ID) from the combo box I would like to be in a position to click it once (the respective student_ID) so that the student_ID in that field is transferred to the subform of the initial form, which has a Student_ID field to store the respective student_ID in the table with the Subform.

How can I do that?

Any help will indeed be highly appreciated.

Regards

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

Open Up A Form From A List Box

Nov 2, 2006

I have a form with a list box on it, I want to be able to open another from with a click on an item in the list box and populate a list box on the second form.

So lets say on the ist forms list box I have Beef, Pork and Lamb, if choose Beef, I want to open the new form and populate the list box with a list of Beef items. Any help is appreciated.

View 1 Replies View Related

List Box Open Form New Record With The ID In

Aug 15, 2006

Hello everyone,
i have 2 tables,
table one =client detials
table two = job information
both have field called ClientNumber in them and have Relationships

i have a form with list box in it with ClientNumber(hidden), Surname, First name and i have a button and i want when i choose a name of list box and click button to open a job information form and be on new record and i want the ClientNumber to be put in the ClientNumber textbox on the form

so if u click on eg: David scown and click button want it to open form and be on a new record and put his Client Number in the client number text box

View 4 Replies View Related

Open A Form Depending On Selection Off List Box

Aug 23, 2006

Hi

I have a form, with 2 Combo Box's and a List Box. The Combo Box's provide a search criteria and the results are displayed in the list box [searchList].

I want to be able to double click a record in this List box [searchList] and that will open a from [frm_SearchDisplay] with the selected record from that List Box [searchList]

Can someone please point me in the right direction.

Thanks in Advance

H

View 2 Replies View Related

Open A Record In A Form When Selected From List Box

Jan 19, 2005

Hi folks,

I have created a form, which extracts records from a table and displays them in
a list box. This works, but what I want to do next is highlight a single record in
that list box, click a button and have the record open in another form. This is
the code I have at present:

Private Sub DisplayEnquiry_Click()
On Error GoTo Err_DisplayEnquiry_Click
Dim dispCriteria As String

dispCriteria = "[SupportEnquiriesTable].[EnquiryID]='" & Forms![Search All].[ListSearch].Column(0) & "'"
DoCmd.OpenForm "Support Enquiries", , , dispCriteria
Exit_DisplayEnquiry_Click:
Exit Sub
Err_DisplayEnquiry_Click:
MsgBox Err.Description
Resume Exit_DisplayEnquiry_Click

End Sub

When I try this I get an error "The OpenForm action was canceled. You used a method of the DoCmd
to carry out an action in Visual Basic, but then clicked Cancel in a dialog box."

I've double-checked that I've typed in the correct names etc. so I am at my wits end!
Can anybody help me out?
Thanks

View 1 Replies View Related

Using List Box To Open A Form To Matching Record

Oct 21, 2005

I have four similar forms - they each have a list box and an "edit" button.

The user selects the item in the list box and clicks edit.

Another form pops up, open to the record that was selected in the list box.

This works in two forms, it doesn't work in the other two forms. Instead it pops up the first record in the table, regardless of what is selected in the list box.

The code is identical on all four "edit buttons." (with field names changed, of course.)

Code:Dim stDocName As StringDim stLinkCriteria As StringstDocName = "frmCaseTypeEdit"stLinkCriteria = "[Case_Type_ID]="&Me![listCaseTypes]DoCmd.OpenForm stDocName, , , stLinkCriteria
The properties in the listboxes are also the same on all four forms - based on a query, 3 columns, and bound column is the first one (which is the ID field).

Does anyone have any ideas what could cause this?

View 3 Replies View Related







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