Listbox In Form

Jul 13, 2006

I have a form with 5 different fields. I have the top field as a dropdown box that you can select the employee id from. I want the next one under it (employee id) to change with the employee id.

View Replies


ADVERTISEMENT

Copying Data Within Same Form From A Listbox Containing A Query To A Blank Listbox?

Apr 21, 2006

Hi, I'm new here, so I hope I'm posting this in the correct place. I've searched the forum to see if there are any existing threads that might help me, but I've not found anything that does...
(I think this thread ( http://www.access-programmers.co.uk/forums/showthread.php?t=93444&highlight=Copying+data )may be trying to achieve something similar to me, but I'm a beginner and don't really understand it)

I shall stop waffling! I'm not entirely sure that what I'm trying to achieve is possible, I expect it probably is!

Right, I have a form (frmGroupRegister, which contains exactly the same fields as the table it comes from, tblGroupRegister), which consists of three things:

-GroupDate - The date a group took place on. It is my primary key, as no more than one group occurs on a specific date.

-ParentList (A listbox which contains a query showing the ID number, forename and surname of everyone in a table, tblParentDetails)

-ParentsAttending (A blank listbox)

I would like to place buttons in between the ParentList and ParentsAttending, which would allow users to conduct a 'register' of attendance by copying individual/multiple details from ParentList into ParentsAttending (much like you get when choosing which fields to include in a form when using a wizard for example). I would also like them to be able to remove people from ParentsAttending by using a button in case of accidentally adding the wrong person into the ParentsAttending box.

I'm aware that another, probably simpler way of achieving this would be to use a tick-box system, but I feel that visually, the first method would both look better and demonstrate who is present more clearly.

Any help would be much appreciated, but my Access skills are quite basic and things will probably need to be spelled out for me.
I'm using Access 2000 and Windows XP.
Thanks for your help,
Alice :)

View 1 Replies View Related

Forms :: Passing Listbox Rowsource To Another Form Listbox

Dec 14, 2014

Using a popup form

1. On my main form, I have a listbox, I would like to edit the values of the listbox.

To do this, I have a popup form with 2 listboxes, one to have the values of the listbox on the main form, and the other listbox with option values for the 1st

1) how to i pass the rowsource sql of the listbox on the main form to the listbox on the popup form

2) how on closing the popup form, do i update the rowsource sql listbox on the main form from the changed value of the popup form listbox rowsource sql

View 3 Replies View Related

Forms :: Dynamic Row Source For Listbox From Multi-select Listbox

Jun 10, 2015

I am using the selections made of the form to generate a query for the user.

I have a CITIES listbox that is populated with values from a stored query.

I would like to make it multi-select and populate a LOCATIONS list box and a NAMES list box based upon the CITIES that are selected.

I have the locations currently populated from a stored query that reads the City selection from the Form. It looks like this

Code:

SELECT DISTINCT (t_location.LOCATION) AS Expr1
FROM t_location INNER JOIN t_asset_master ON t_location.LOCATION_PHY_ID = t_asset_master.LOCATION
WHERE (((t_location.CITY)=[Forms]![MasterQueryGenerator]![CityList]));

I also want multi-select so that is you can un-select all and get the results for all cities.

Here is my half thought approach.

Code:

Private Sub CityList_AfterUpdate()
'Dim LocQryStr As String
'Dim r As Integer
'Dim ctl9 As Control
'LocQryStr = "SELECT DISTINCT (t_location.LOCATION) " & _

[Code] ...

I intended to have the variable LocQryStr as the row source but I abandoned the idea of having multi-select when I saw that .Selected(I) never returned true. Its like the values aren't read in this subroutine.

View 5 Replies View Related

Forms :: Listbox To Show Types Based On Section In Other Listbox

Sep 9, 2013

I have a list box called "product list box" based on a query called "searchqry", i also have another listbox called "type list box" , how do i get the type list box to only show "types" based on the section in products list box?

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

Value From Listbox Into Field On Another Form

Jan 26, 2006

I have a listbox lst_IP_OPEN with a command button IP_SEND on a form fm_IP_STATUS Im am trying to get it so that when you select 1 item from the listbox and click the button it will update the field IP on another form fm_SYSTEM. I can get it to work updating a text field on the same form. But I can not get it to update a field on the other field. Both forms are open at the same time. The code I used to get it to work on the same form is

CODE:

Private Sub IP_SEND_Click()

Me.[test] = Me.[lst_IP_OPEN].Column(0)

Exit_IP_SEND_Click:
Exit Sub

I am sure this is simply a matter of changing the ME.[test] to the correct thing but I just can't seem to get it to work.

Thanks for the help

View 3 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 :: Listbox To Continuous Form?

Oct 24, 2013

I have a listbox which contains a list of schools. I would like the user to be able to select 1 or all the records from that list box. From that list of selected records, my goal is to allow the user to use each school selected and use that as a record source for a continous form so I can allow the user to input a integer next to it, like school size.

Example:
Listbox (Schools)
ID, Name
1, Thomas School
2, Jefferson School
3, Washington School
4, Madison School
5, Franklink School

User select Thomas, Washington and Madison

In a Continuous Form it would list,
Thomas School, Text Box (Allow User to input School Size)
Washington School, Text Box (Allow User to input School Size)
Madison School, Text Box (Allow User to input School Size)

I then would save those records into a table.

View 6 Replies View Related

Set Default Value For Listbox For Form Load

Jan 10, 2015

I'm pretty much a complete novice here so I hope I explain this correctly. I have a form with a list box used to filter data for only "Open" or "Closed". This form works fine, but what I'd like to do is that when the form loads, for it automatically select "Open". The listbox is called lstTaskStatus.

Here is the sql for the form in case I need to put code in here somewhere.

SELECT tblObjective.SourceName, tblObjective.Objective, tblObjective.[Relationship Lead], tblObjective.[Management Lead], tblObjective.[Contract Start Date], tblObjective.[Contract End Date], tblObjective.Status, tblTask.[Task/Deliverable], tblTask.Staff, tblTask.[Start Date], tblTask.[Due Date], tblTask.[Completed Date], tblTask.Notes, DateDiff("m",[tblObjective]![Contract Start Date],[tblObjective]![Contract End Date]) & " Months" AS [Contract Duration], tblTask.[Task Status]
FROM tblObjective LEFT JOIN tblTask ON tblObjective.ObjectiveID = tblTask.ObjectiveID
WHERE (((tblTask.[Task/Deliverable]) Is Not Null) AND ((tblTask.[Task Status])=[Forms]![frmqryTaskList]![lstTaskStatus]))
ORDER BY tblTask.[Due Date];

View 2 Replies View Related

Passing OpenArg To Listbox On Other Form

Aug 11, 2011

On the first form I have a button with the following OnClick event :

Private Sub Rispondi_Click()
acbReceiveMail
On Error GoTo Err_Rispondi_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmSendMail"

[Code] ....

On the form opened upon click ("frmSendMail") I am trying to populate the "cboTo" combobox with the "txtFrom" value from first form. In the OnLoad event I have written :

Private Sub Form_Load()
Me.cboTo = Me.OpenArgs
End Sub

Anyway after clicking the button that should open "frmSendMail" I get a popup saying : "An expression you entered is the wrong data type for one of the arguments" (run-time error '2498') ....

View 7 Replies View Related

Listbox Extended Multiselect & Opening Form

Dec 12, 2006

Hi, i was wondering if it's possible in a listbox with the multiselect option set to extended simply click on a field and open a form with the data of this field..

example:
i've a listbox of my customers, (only first and last name)..i click on one of this and a new form with all the details'll open, so i can see and modify stuff...
with the multiselect set to none this works..but with the extended??

(btw..i wanna just click on one filed, but i need the extended multiselection on for other options..)

thx in advance

View 14 Replies View Related

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 1 Replies View Related

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

Listbox Displays Data Associated With Parent Form?

Dec 23, 2006

Hey guys,
I was wondering... is there a way to have a listbox display values associated with a parent form ID? in other words... say I have a customer with invoices associated with their name, I want to display a form for that customer with a listbox (or maybe even subform) containing the invoice IDs associated with their name.
Right now, I've got:
SELECT qryClientData.InvoiceID, qryClientData.InvoiceDate FROM qryClientData ORDER BY [InvoiceDate]; to display information in the listbox. How do I modify this to display ONLY Invoices associated with the Clientname on the parent form?

I hope this makes sense. I can clarify if need be, I am just completely stumped. thanks and happy holidays!

View 7 Replies View Related

Listbox Populating Data To Form - Help Needed!

Apr 26, 2006

http://forums.aspfree.com/microsoft-access-help-18/menu-list-values-won-t-pass-to-db-20951.html

Here's a page that shows almost what I am trying to do, but my question is how do I make selecting an item in my listbox pupulate date in multiple field on my form?

For instance, I want to click on a line in a textbox and have the fields "City" "State" and "Zip" all changed on my form, not just "City"

View 4 Replies View Related

General :: Listbox - Use Autonumber To Filter The Form?

Jul 29, 2013

So i have a form with 3 fields. (This is just a test form/table):

ID: autonumber
Fullname: text field
Last4: number field

I have the following code:

Code:
DoCmd.OpenForm "test", , , "Id = '" & Me.List14 & "'"

It keeps giving a mismatch error. How do i get it so I can use the autonumber to filter the form?

Code:
DoCmd.OpenForm "test", , , "Fullname = '" & Me.List14 & "'"

When I do this it works just fine.

View 3 Replies View Related

Forms :: Unbound Form With Bound Listbox

Jun 2, 2015

My code is not working.

1. The code below should equal the Current Month
2. It does not close the form if no data.

PHP Code:
If DLookup("[CurMonth]", "tblEmpEvaluation") = Format(DateSerial(Year(Date), Month(Date), Day(Date)), "mmmm ")
  DoCmd.OpenForm "frmEvalNotice"
End If 

PHP Code:
If DLookup("[CurMonth]", "tblEmpEvaluation") <> Format(DateSerial(Year(Date), Month(Date), Day(Date)), "mmmm ") Then 'No Data. NotWorking?
    DoCmd.Close acForm, "frmEvalNotice"
End If 

View 7 Replies View Related

Forms :: Populate Listbox On Dialog Form

Sep 19, 2013

In my tables I have a field called first serial. This is the first element of a serial number range associated with each record. Very rarely I have to ask the user to specify a certain serial number in that range. (The serial numbers can be generated easily from the first serial) This happens during the run of a macro, so I have to use a Fom opened with WindowMode:=acDialog. The problem is that I have to populate a listbox with the generated serial numbers on that form. But I can't interact with a dialog form, since it stopos the running of the macro. I have tried to open it hidden, and change the modal property to true once the listbox have been populated, but this dosen't stop the macro to wait for user input.Is it possibble to pass the first serial value to the form, and populate the listbox in one of the Form's opening events?

View 3 Replies View Related

Forms :: How To Go To Specific Record In Listbox From Another Form

Dec 11, 2014

I have three forms: Form1 that contains subform1 and Form2 which is totally separate. Form1 contains a listbox that I use as a search form. When a record in the listbox is clicked, it populates Subform1 with more details.

If I am in Form2, I would like to be able to click a record which opens the listbox in Form1 to the same record (this will automatically update subform1 with the details).

View 7 Replies View Related

Forms :: Listbox On Form - Checking For Duplicates

Aug 14, 2013

I have a Listbox on a fprm which has a button attached to it, the button allows you select one of the items in the listbox and append it to a table. the problem is that it currently allows you to add the item as many times as you like. How can I check for duplicates?

Code:
Private Sub CmdAdd_Click()
'Add new record to tblShootingTasks
strSQL = "INSERT INTO tblShootingTasks ( ShootID, ContactName, Task ) " _
& "SELECT [Forms]![frmTasks]![ShootDateiD] AS ShootID, [Forms]![frmTasks]![Combo15] AS ContactName, [Forms]![frmTasks]![Frame17] AS Task;"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
End Sub

View 14 Replies View Related

Reports :: Filter Report From Listbox On Form

Oct 24, 2013

I have a report based on a query, the report loads filter based on dates input to the query from Form1 when report loads. I want to filter this report further from a listbox on form2, but I want the listbox rowsource to populate based on a field in the loaded report. Is this possible?

View 2 Replies View Related

Finding Location Of Listbox On SCREEN And Not On Form

Jun 11, 2014

I have code that finds the current position of the mouse on the screen in X,Y coordinates.

I am curious if there is something similar that can let me know the X coordinate (basically the .left function but for the screen) of a listbox?

View 3 Replies View Related

Creating Average Listbox In Form Sheet

Jul 25, 2012

I was wondering if it was possible to create a average list box in a form sheet? For example, I want to create another listbox underneath the 3rd box to average out what I have circled. Is this possible to do in access?

View 1 Replies View Related







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