473,322 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

list boxes don't update with the right row source (from query) when navig. in form

9
Hi!

I have a list box that updates it's row source with a query that is dependent on two other form controls.

But it doesn't change when I move from a record to another within the form, unless I change the controls that are criteria for the query, after i have moved from one record to another. I've put the Me.refresh command in the On Change event of the controls, as a kind person pointed out in my previous question

Now I tried using Me.refresh with events such as On Enter (of the subform), On Load (of the form) but to no avail.

thanks for your help!!
Jan 24 '08 #1
3 1505
missinglinq
3,532 Expert 2GB
Are the controls that are used by the query bound controls? If on Record A you pick/enter English and Spanish, go to Record B and pick/enter Russian and French, then return to Record A, do the controls still hold English and Spanish?

If the controls are bound and retain their original value for the given record, in the Form_Current event requery the listbox, with something like

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.   MyListBox.Requery
  3. End Sub
  4.  
substituting the actual name of your listbox for MyListBox.

Welcome to TheScripts!

Linq ;0)>
Jan 24 '08 #2
gismar
9
thanks so much that worked like a charm!

also thanks for the welcome :)
Jan 24 '08 #3
missinglinq
3,532 Expert 2GB
Glad we could help!

Linq ;0)>
Jan 24 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: chris vettese | last post by:
I have a table called table1 that has a one to many relationship to table2. What I would like to do is have a form with two list boxes on it. The first list box will have a field from all of the...
8
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and...
4
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one...
5
by: Andrew Meador | last post by:
I have a form (Change Card List by Status) with a check box (cboNOT) and a list box (lstStatus). There is an Open Report button that opens a report (Report - Change Card List) which uses a query...
18
by: LosLobo | last post by:
Greetings all. I know that cascading lists are a common problem and in truth I my initial post here was to request help with my own, but then I figured out the right code. That being said, I have a...
2
by: woodey2002 | last post by:
Hi Guys and thanks for your time. I have a search form for my database that allows users to select multiple criteria from multi select list boxes. I successfully integrated a multi select...
6
by: woodey2002 | last post by:
Hi Everyone. Thanks for your time. I am trying to create a search form that will allow users to select criteria from multiple multi select boxes. So far i have managed to achieve a search option...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.