Listbox Not Updating

Jan 25, 2006

Greetings to one and all
I have a minor problem with a list box not updating that is driving me up the wall.
Here is what I have
I have a Form that has multiple pages (Tab control) and in one of the pages I have a list box that has row source of :

SELECT DISTINCT temp_wbs.Wbs_Element_No FROM temp_wbs LEFT JOIN my_wbsids ON temp_wbs.Wbs_Element_No=my_wbsids.Wbs_Element_No WHERE (((my_wbsids.Wbs_Element_No) Is Null)) ORDER BY temp_wbs.Wbs_Element_No;

The temp_wbs table is created after a user runs a process in a previous page, but when the user selects the page that has this list box – it is not updated with the current values from the temp_wbs table – it still contains old data.

However – when the user clicks a button on this page to delete their list (data from my_wbsids table) – the list box refreshes with the correct values from temp_wbs

What am I missing?
Any help in this matter is greatly appreciated
Thank you,
Kenny Louden
:confused:

View Replies


ADVERTISEMENT

Updating A Listbox

Nov 27, 2006

Hi,
I've a listbox. Once i doubleclick on a data on this listbox an editing form will open.
I modify my data, save, close. But the data on the listbox are the same as before..
how can i update this data?? Something like once i saved & closed the editing form the listbox will update....don't know..
i've tried stuff like requery,refresh, ... but didn't work.. (was my mistake maybe)..:D
thx in advance

View 5 Replies View Related

Listbox Not Updating Table

Mar 16, 2006

Hi All,
Apologies if I'm posting in the wrong forum. Not quite sure whether this should be in tables or forms.

My question is, I have two tables, one containing general data and one containing data used to populate a listbox. I want the selected value in the listbox to be used to populate the corresponding field in the other table but my users want to be able to tab through the entry form. If they tab over the list box without actually selecting a value, the table is not updated with the listbox value. How can I make this work?

Hope that's clear and someone can help.

Many Thanks

Rich.

View 1 Replies View Related

Updating Subform From Listbox

Oct 10, 2004

I have a listbox that navigates my form to a specific record based on ClientID

I also have a subform. This form has a field Called clientID which I want to pull all records with the current ClientID.

I can't get my subform to query only the records with the current ClientID in the ClientID field. How can I do this?

View 3 Replies View Related

Updating A Listbox According To The Record You're Viewing

Apr 30, 2005

Hi

I have a database containing 3 tables (for now):
Customers
Orders
Catagories

Now i also have a form with customer information.
In that form is a listbox with a query statement, so that should display wich orders are placed by that customer.

SELECT Orders.[Order-ID], Orders.Description, Orders.Date, Orders.Category FROM Orders WHERE Customer=[Customer-ID];


Now this works for the first costumer record being displayed.
However when i view the next costumer, the listbox still displays the order information from the first customer.

How can i get the listbox to update itself when a diffirent record is viewed?

Thanks in advance

View 4 Replies View Related

Modules & VBA :: Updating Multiple Items In A Listbox

Jan 9, 2014

In my form I have the listFunctions list box set to Multi Select "Extended" in the following code contains a line to execute a query based on the selected items in a listbox. but for some reason instead of only changing the selected items it is changing all items in the listbox. I stepped through the code and it is looping the correct number of times based on the amount selected but is still changing all.

eg.if I select 3 items from the list, it loops through the execute 3 times.but the total 6 items will change.

Code:

Private Sub cmdEdit_Click()
Dim varItm As Variant
Dim sSQL As String
Dim ssSQL As String

[code]...

View 1 Replies View Related

Forms :: List Box Updating Using Another Listbox Value As Header?

Sep 14, 2013

I need to construct a very complex student/coach/time/day Database.

Every student can attend a lesson twice a week, on a particular day and time with a particular coach.

Every coach has his/her own time table (Days available, times available on those days).

So I want this effect on a form:

Day: Monday
Coach: Jack
Time: 10:00

So Coach is dependent on Day, Time is dependent on BOTH Coach and Day.

I got the first one working but I am stuck on the second.

I created a Table for every day of the week (Mon through Friday) and have each coach's name as the "header" of a column, in that column I have the times they are available:

Code:

Jack - Roy
08:00 - 09:00
08:20 - 09:20
08:40 - 09:40

In my form, in the event procedure of the second list box I have the following:

Code:
Select Case [Swimming_Day_1]
Case "Tuesday"
[Time_1].RowSource = "SELECT [Coach_1].Value " & _
"FROM [Tuesday Times] "
End Select

But now when I select for example "Jack" in the "Coach_1" List box, the "Time_1" list box lists 3 entries of "Jack", not "08:00, 08:20, 08:40" respectively.

How can I accomplish the above without having to create a separate Day/Times Table For each and every coach (There are 8 coaches and 5 days, and I want things as easy as possible to update coaches should there come extra or some leave maybe).

View 5 Replies View Related

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

Forms :: Updating Fields Via Code Not Updating Table

Dec 16, 2014

I have a form that has combo boxes and text fields (as well as sub forms). There is also a button linked to some code that says'

Private Sub cmdQuote_Click()
'Creates quote date and prints quote
Me.QuoteDate = Now()
Me.cbAgentID.Requery
DoCmd.OpenReport "Quote", acViewPreview, , "BookingID = " & Me.BookingID
End Sub

When the button is pressed the QuoteDate field (it is bound) should be be populated, but unfortunately it is not. I have played with refresh and requery but cannot derive a solution.

View 1 Replies View Related

Select All Listbox AND Update Listbox

Jun 17, 2005

Hello,

I've got this multiple select listbox which writes data into a textbox:

Private Sub List2_AfterUpdate()

Dim Cursisten As String
Dim ctl As Control
Dim Itm As Variant

Set ctl = Me.List2

For Each Itm In ctl.ItemsSelected
If Len(Cursisten) = 0 Then
Cursisten = ctl.ItemData(Itm)
Else
Cursisten = Cursisten & "," & ctl.ItemData(Itm)
End If
Next Itm
Me.txtCursisten = Cursisten

End Sub

And I've got a SELECT ALL button to select all records in the listbox:

Private Sub cmdSelectAll_Click()
On Error GoTo Err_cmdSelectAll_Click

Dim i As Integer

If cmdSelectAll.Caption = "Alles Selecteren" Then
For i = 0 To Me.List2.ListCount
Me.List2.Selected(i) = True
Next i
cmdSelectAll.Caption = "Alles De-Selecteren"
Else
For i = 0 To Me.List2.ListCount
Me.List2.Selected(i) = False
Next i
cmdSelectAll.Caption = "Alles Selecteren"

End If

Exit_cmdSelectAll_Click:
Exit Sub

Err_cmdSelectAll_Click:
MsgBox Err.Description
Resume Exit_cmdSelectAll_Click

End Sub

The only thing is that when I use the SELECT ALL button, the function List2_Afterupdate doesn't work anymore. There must be a simple solution but I just can't figure it out. Can anyone please help me?

Tnx a lot!

View 13 Replies View Related

Move Items From Listbox To Other Listbox

Jul 16, 2006

Hello everybody,

Hopefully somebody can help me on this one. I searched the whole internet and access forums, but I didn't find the exact solution for my problem.

I've got a table with students, a table attendance, where I now only save the students who are absent, but I would like to save also the students who are PRESENT (at the same time).
I've got a combobox where I filter the Class, which then updates a listbox with the students from that class. What I do now is select the students from the listbox and then press a save button and it saves the records to the table absence with STATUS: ABSENT.

I would like to save the NON selected students also in that table, but with PRESENT in the column STATUS.

I thought of making another listbox next to it, where after selecting the absent students, they wil apear and disappear in the PRESENT table so I can store all the information.
But the only problem is that I can find this solution when the listbox is populated by a list of values instead by a table or query. And the other solution is to store the temporary data into 2 different tables, but that's not working for me because it's a multi user database and everything will be messed up.

Hope that someone can help me, I will be very happy.

View 4 Replies View Related

Forms :: Hide Unchecked Values In A Listbox - Create Hyperlink On Listbox Values?

Jan 20, 2014

Firstly, is it possible to hide unchecked values in a listbox? I have a user with several roles and I want to only show the ticked roles in the listbox.

Secondly, can you create a hyperlink on listbox values? i.e, if I click on "Manager" in the roles listbox, it follows that to another form and opens the record about managers?

View 10 Replies View Related

ListBox

Nov 23, 2006

What I am trying to do is to swap item position in ListBox without adding/removing items. Index doesn't need to change, but the text show in the ListBox need to. For example.

lstField contains:
Item 1
Item 2
Item 3 (selected)

What I want to do is when click a button (cmdUp) the Item 2 should be Item 3 and Item 3 should be Item 2

Item 1
Item 3
Item 2

How can I do this in MS Access.
Please let me know.

View 2 Replies View Related

About Listbox

Jul 12, 2007

1)How to set show or not show key column for list box in propeties windows?
2)For list box, after doing
lstListBox.rowsource="select field1, field2 from tbl"
lstListBox.requery
How to
a)Set show keycolumn;
b)make the first item in the listbox selected?A

View 1 Replies View Related

ListBox

Feb 8, 2005

I have a list box that displays different times. Can some one help, how do get the value from the list box that was selected to show in a text box on another form?
Thanks

View 3 Replies View Related

Listbox

Mar 7, 2005

I have a list box on a form. What I want to do is get the value of one field in the first line of data in the list box.

View 1 Replies View Related

ListBox

Jul 18, 2005

I've been searching through all the forums and sample databases for listbox searches and can't seem to make head or tails of them. They are all so different and I can't seem to get something to work.

Could someone please point me in the direction of a fairly simple listbox search that I can understand.

Basically I have two cascading combo boxes and would like to search after this has been filtered into the listbox. Then I would like to select one of the options and have the whole record show up. Any help at all in pointing me in the right direction would be extremly helpful. I've been working on trying to get a search function to work for 3 days and haven't had any luck at all.

View 1 Replies View Related

ListBox

Oct 5, 2005

I would like the ability when I select multiple items in a list box, to count the selected items. I have a email management Module and I have users select multiple emails from this list to perform group emailing. I would like to provide a number of selected emails. Does anyone know how. I am trying to avoid several hours of worki in trying to figure this out. I apreciate it,

Thanks Antonio

http://www.newgenerationaccess.com
Application & Database Development Company

View 1 Replies View Related

Listbox Help!

Dec 2, 2005

I have a form with a listbox on it. the list box contains site numbers. (lstSite)

i would like the user to select which site/s they want information for.

i have another query that includes site,date,and other data
i put in the criteria for site as being forms!main!lstSite.value but it is not showing any records, even if i did select the site. i also tried forms!main!lstSite. this did not work either.

I have a feeling i am refering to the object incorrectly.

any help would be greatly appreciated

tkaplan

View 1 Replies View Related

Listbox Woe's

Jan 9, 2006

I have a form with a listbox in it. the list boxed is used to select an item to view in the sub form. All is well except when i try to add an item to the list box. I have set up a macro to enter new data in the list box by opening the table that supports it and entering the new data. what i need is for the list box to update and show the new information entered automatically. as of now i need to close the form and reopen it to view the changes.

thank you

View 3 Replies View Related

Using Listbox

Feb 19, 2006

I am trying to find out whether is possible to eliminate values that appear twice or more in a list box menu. I don't want to remove an entire record.Just a value that appears many times...

Thanx
Kyriakos

View 1 Replies View Related

Listbox Help

Dec 11, 2006

I am developing a database for my work to keep track of volunteers we get for community service hours. I have the following tables:

tblVolunteers
VolunteerID (PK)
FirstName
LastName
Address
City
State
Zip
Phone
DateAdded
Notes

tblFiles
FileID (PK)
VolunteerID (FK)
OpenDate
HoursRequired
DueDate
Status
Notes

tblProjects
ProjectID (PK)
Description
Instructions
Status
Priority
DueDate
DateAdded
Notes

tblTransactions
TransactionID (PK)
FileID (FK)
ProjectID (FK)
TransactionDate
TimeIn
TimeOut
StaffInitials
Notes

I have a form where a staff person searches for the volunteer they will be signing in. A listbox displays all the volunteers in the system. They select a name, then click open, and the sign-in form opens to that volunteer. Right now the only thing on the form is the volunteer contact info. I would like to put a listbox next to it that will show all the Files for that volunteer. What I then want to be able to do is click on that file and have a subform show all the transactions (Date, Time In, Time Out, etc…). I’m just not sure how to write the rowsource for the listbox.

Please if you have any questions if I did not clarify myself, please ask!

Thanks ahead of time!
ScrmingWhisprs

View 2 Replies View Related







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