Open New Form Based On Listbox Selection

Oct 25, 2005

I have a form which has a listbox listing all the letters a student has had sent home. Basically i want to be able to click on a letter in the list box and for a popup form to open with the record details. However it just brings up a blank record.

The list box has a unique field called standardletterID.

the code behind the button to filter was just used through the wizard to open the popup form is:

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmstandardletterspopup"

stLinkCriteria = "[StandardLetterID]=" & Me![List0]
DoCmd.OpenForm stDocName, , , stLinkCriteria

but it doesnt seem to be working :(

I thought this would be easy but no matter how much i destroy my database trying to do it its not playing ball!

View Replies


ADVERTISEMENT

Open Form/record With Listbox Selection

Sep 26, 2006

Hi,

Need help on a list box issue. Solution is probably real simple, just can't see it with my bleary eyes.

I have a form (INSTLKP) with only a list box (List6) based on a table ((tblPersData) with fields PersdataID; SSN; Last; First; MI) on it. When I open the form up, the listbox does display all records associated withthe table. I would like to doubleclick on a desired SSN in the list box and have that record open up in a form (Perssub1) in edit mode.

And that is where the rub is... I have the following code in the On doubleclick event of List6


Private Sub List6_DblClick(Cancel As Integer)

DoCmd.OpenForm "Perssub1", , , "[PersDataID]= " & Me.List6, , acWindowNormal

End Sub


All it does it just open a blank Perssub1 form. Any ideas on what I'm missing?

:confused: Hawg1

View 6 Replies View Related

Open Form Based On Value From A Listbox

May 19, 2006

Hello !

I am a newbie in access and would appreciate if someone could help me with a delicate problem i have

I have listbox in formA named "Liste1", this listbox contains a departmentvalue (unique) in the first column shown in the listbox.

What i want to do is open a new form (frmStructureDetails) by doubleclicking on the listbox, and i want the new form to load with filter on that department. Btw the departmentvalue is textformatted.

The result i get is a dialoguebox opening and not seeming to recognize which value to use, if i fill inn the value i clicked on the form loads with the correct data.


What am i doing wrong:

Private Sub Liste1_DblClick(Cancel As Integer)
On Error GoTo Err_SearchList_DblClick
Dim db As DAO.Database
Dim rst As DAO.Recordset

DoCmd.OpenForm "frm_StructureDetails", , , "[Department] = " & Me.Liste1


Exit_SearchList_DblClick:
Exit Sub

Err_SearchList_DblClick:
MsgBox Err.Description
Resume Exit_SearchList_DblClick

End Sub

View 1 Replies View Related

Forms :: Open New Form Based On Combo Box Selection

May 26, 2013

I have "donations" form with a cbo called "DonationType".

(frmDonations.DonationType)

General
Employee Match
Employer Match
Angels*
Friends*
Royal Crown*

The last three options need to redirect the user to a different form used for pledged donations.

View 2 Replies View Related

Forms :: Open Form Based On Combobox Selection

Feb 12, 2014

I have three different forms.

1. form is a Login form where i choose between: AA, HH or FA

After choosing on my first form second form opens.

Now my question - how can i do the following:

Based on the combobox in form 1, my button i form 2 will either open form 3, 4 or 5...

View 1 Replies View Related

Forms :: Listbox Selection Based On A Table

Jul 18, 2014

I have a form with a listbox that allowed multiselection.

The listbox depends on the field "name"

And I have a table "names_should_be_selected" (fields: name, date ...)

It would be great if alle names in the listbox are selected when the name is in the table "names_should_be_selected".

View 3 Replies View Related

Forms :: Running A Query Based Upon A Listbox Selection?

May 1, 2015

I have a list box that is correctly listing resources from a table (tblResource). I would like to select one of the list box entry and run a query against the tblResource to show the information for that resource in a form. I have tried to use the lstindex with the control (lstResource) in the where clause of a query to accomplish this with no success.

View 5 Replies View Related

Modules & VBA :: Populating A Table Based On ListBox Selection

May 27, 2014

I have a form with a Listbox which lists Customers and a variety of customer information

I also have a table on the form that lists the donations that customers have made.

How can I populate the Table based on the customer that is selected in the Listbox?

There is an ID field that links Customers with Donations

I'm guessing I need some code in the ListBox_CLick() event that triggers the table to query or to Load with a query based on the ListBox.Column(0) which contains the ID?

View 2 Replies View Related

Modules & VBA :: Changing Combobox Text Based On Listbox Selection

Jul 26, 2013

I have a listbox with several options.

When the user selects one of these items, i want a combo box's text to be changed to the selected item in the list box.

The listbox is named : D_OutputLsb
The combobox is named : D_ComponentNameCmb

View 4 Replies View Related

Forms :: Filter A Report Based On Listbox Selection - Apostrophe In Results

Feb 17, 2014

I use the follwing code to filter a report based on the listbox selection on a form. Below is the code I use, the problem it will error if the results have an apostrophe in the string.

Private Sub FilterDesc_Click()
Dim strWhere As String
Dim ctl As Control
Dim varItem As Variant
'make sure a selection has been made
If Me.ListCarrier.ItemsSelected.Count = 0 Then
MsgBox "Must select at least 1 Carrier"

[Code] ....

View 7 Replies View Related

Report To Open Based On Comobox Selection

May 9, 2013

I have some code that was written by someone else. I am trying to duplicate this in another database but, can't seem to get it to work. I also don't understand how this code is working as as there is no reference to the combo box in the code behind the print button. But depending on what you select in the combo box the report opens and filters on that selection. The following code is behind the print button. There is a separate combo box, that does not seem to have a connection to the print button. It just has a query behind it for the items to select from.

Public Sub BTNPrint_Project__Job__Numbers_Click()
On Error GoTo Err_BTNPrint_Project__Job__Numbers_Click
Dim stDocName As String
stDocName = "RPTProject Number (Job) Book Year"
DoCmd.OpenReport stDocName, acPreview
Exit_BTNPrint_Project__Job__Numbers_Clic:
Exit Sub
Err_BTNPrint_Project__Job__Numbers_Click:
MsgBox Err.Description
Resume Exit_BTNPrint_Project__Job__Numbers_Clic

View 14 Replies View Related

Modules & VBA :: Unbound Textbox To Display Memo Field Based On Listbox Record Selection

Apr 21, 2014

My table:

tblHeatTreatment
- HeatTreatmentID - PK
- HeatTreatmentDesc - Text
- HeatTreatmentDetails - Memo

My form has a listbox (lstHeatTreatments - Multi-Select disabled) that displays Heat Treatment descriptions and an unbound textbox (txtHTDetails) that I would like to have display the corresponding memo field when a description is selected from the listbox.

This is my code so far:

Code:
Private Sub lstHeatTreatments_AfterUpdate()
Dim myConnection As ADODB.Connection
Dim myRecordSet As New ADODB.Recordset
Dim mySQL As String
Dim selectedRequirementKey As Long
Set myConnection = CurrentProject.AccessConnection
Set myRecordSet.ActiveConnection = myConnection

[Code]....

When I run the code I get an error:

Quote:

Run-time error '-2147352567 (80020009)':

The Value you entered isn't valid for this field

When I debug, it highlights:

Code:

Me.txtHTDetails = myRecordSet.Fields

View 3 Replies View Related

Forms :: Open Report Based On Combo Box Selection?

Jan 29, 2014

I am struggling to pull out a report based on the combo box selection. I have NOI database and want to pull out a report for a specific customer that how many NOIs are generated by this customer..

I have a separate table of customer and another table of NCRs and the customer information comes from customer table.

I have tried the below statement but gives me an error message:

code for Macro that pulls the report in click event:

[CustomerName]=[forms]![CustName]![combocust1]

do i need to mention the report as well in some where in report ?

View 14 Replies View Related

Forms :: Make Listbox Visible After Selection Of Another Listbox

Oct 23, 2013

Okay then, after much trouble and confusion, I finally realized I need to use an Extended listbox in order to allow for multiple items to be selected from a list on my form (rather than the evil multiple selection combobox!).

However, now I am trying to figure out how to make one listbox (IndustryClassification) only be visible if the item "Industry" is selected in another listbox (TypeOfBusiness). Coding I can use for this in the AfterUpdate event of the listbox?

View 7 Replies View Related

Open A Form With A Combo Box Selection??

Nov 24, 2005

Hello,

Please help, I am still kind of new to Access. My problem is. I need to be able to open a form from a selection of a combo box. Thank you in advance.

View 3 Replies View Related

Open Form From Listbox

Aug 15, 2005

I have a list box on a form with 10 items to
choose from. When a item is chosen I want
a form to open (OnOpen or OnLoad Event ??)
with a recordsource depending on one of the
10 items chosen in the list box.
The recordsource is an sql statement which
will change/depend on the item selected
The 10 items refer to 10 different tables.

Thanks for your help

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

Combo Box Selection To Determine Which Form To Open

Jul 13, 2005

Hi don't know if I'm trying to do something that can't be done but I'll give it a try

I have a combo box which selects a type of incident e.g. report, SIF, Phone call etc

and dependent on what is selected I would like to get access to automatically select which form to open so if report is open when the command button is clicked then the report form would be opened, when SIF is selected the SIF form would be opened etc...

How do I go about this.. I have only ever wrote code in excel, so can I have step by step if it involves code (which I guess it does) including where to put the code and even how to go about it

Thanks in advance to all

View 6 Replies View Related

New Form Based On Selection

Feb 3, 2006

Is there a way to take a form, select the fields that you want to display on a template(I created the template)? Then the fields that aren't selected grey/disable them? In other words. We perform several tests, ie. test 2006.01 and 2006.02 etc. Each test is based on 1 table. So instead of having to go in each time a new test is needed, can I create a form that has selectable fields(checkboxes), and once I say ok it opens the "new" template it will have the fields that need to be on that test then grey out the ones that aren't going to be used this time around? Sort of new to this....

View 2 Replies View Related

Open Form To Selected Record From Listbox

Dec 13, 2006

Yet another question.

I have a listbox on a form that show all Files for a particular volunteer. I have an "Edit File" button below the listbox to be able to edit that particular file. Is there a way about opening that form to that specific record without using a query?

Thanks
ScrmingWhisprs

View 12 Replies View Related

Forms :: Using Combo Box Selection To Open Form And Goto Record

Jan 14, 2014

I have a combo box called Combo9 in form NavigationF, the combo box displays the results of FollowUpQ Query. What I would like to do is when the user selects a row from the combobox is closes NavigationF and opens ContactHistoryF and goes to the record selected in the combo box. I have made sure that the combobox contains CustomerID which is the primary key for my table.

View 4 Replies View Related

Forms :: ListBox DblClick To Update Open Form

Feb 5, 2014

I have 2 forms: frmExcEntry and frmItemSearch. frmExcEntry is a data entry form where the associate enters PO#, Item#, Qty, etc. frmItemSearch is a popup form that is used to narrow the search of the Item# from frmExcEntry. Right now, when the associate types the Item# (either PartNo or FactNo)in the txtItemNo control on frmExcEntry, frmItemSearch opens (frmExcEntry remains open) with all potential item #'s associated with the text entered in [txtItemNo]...(there could be multiple FactNo in our inventory system but PartNo is unique and the bound field for the control). frmItemSearch uses an unbound textbox (txtSearch) that populates with the text from frmExcEntry on txtSearch_GotFocus and queries a listbox with the list of possible PartNo to select. I want the associate to be able to double-click the accurate PartNo from the list box which will then update the value initially typed in txtItemNo and copy the PartNo over txtItemNo in the currently open frmExcEntry.

View 3 Replies View Related

Forms :: Based On User Selection In A Form / Create New Records For Subsequent Form

Feb 3, 2014

The user will be creating a new project that contains a bunch of releases. The releases have standard names which are stored in a table tbl_ReleaseNames It should be noted that the list of names is not static.

The user selects which of the releases pertains to their project and then based on their selections, new records would be created in tbl_RFP_Release and then a subsequent form would open where it would display each of these newly created releases where they could enter additional information. I thought of creating an unbound checkbox associated with each of the standard names, and then checking to see if the checkbox was checked and then creating the new records followed by opening up the new form.

View 6 Replies View Related

Print Form Based On Combo Selection?

Apr 10, 2006

Hello!

I have almost completed my database, everything I had originally intended to implement into it has been done, with some extra added features I popped in along the way. There is just one more thing I require assistance with...

My database is used for booking camera kits in and out. On the add booking form the user has to pick a "Camera Type" from a combo box. When they have made their selection, a form pops up with details of all of the components contained within the kits. The user can then check/uncheck the relevant components and close the form.

I have used a command button which prints off the data contained within the current booking form, and also the data contained in the form that pops up when the camera type is selected.

However, as there are more than 1 different types of camera, comprising different components, I need to be able to print off the form relevant to the kit type.

I do not know how I can do this as I have just specified the command button to print the form for the default kit.

I basically need some VB code which will print the form based on my combo selection, as my knowledge of VB is pretty primitive, I was wondering if someone could help me out :)

Any help would be appreciated!

View 2 Replies View Related

Change Subform Based On Form Selection

Jul 2, 2005

Greetings! This forum has been most helpful to a rusty Access user.

I'm creating a student group score entry form, having problems with creating the form I want. Say for example we have the following:
1. Three groups: A,B, and C.
2. Group A has 5 students, Group B has 3, and Group C has 20.

I want a form where I can select group A, and a list of the students will populate and enable me to enter scores for all of them on the same page. This will save time not having to re-enter the information for so many students. If anyone has a clue of what I'm talking about or is willing to lend me aid, I would appreciate it.

Cheers.

View 4 Replies View Related

Modules & VBA :: Open Specific Powerpoint File That Matches A Selection On Access Form

May 27, 2015

We have an access database which has a form that has a list box that details particular records. See attach "list box".

What I would like to do is double click on the record and this would look in a powerpoint folder (see attach "path") and open the presentation if there is a match to the value in Listbox Column 5 i.e. Tool Number.

I can get it to open the presentation if I include the tool number in the path but I cannot seem to be able to get it to compare the values and only open if there is a match.

View 4 Replies View Related







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