473,387 Members | 1,578 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,387 software developers and data experts.

having trouble on form_open: set value of two listboxes

hello,

i have a button that opens a form and sets two list box values based on a value from a combobox in an open form. one list box's value are dependent on the others; there is a many-to-one relationship. so for example:

cboSchool on formA contains a value. i press a button, formB opens and the button runs this code setting the two list boxes to appropriate values.

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm stDocName, , , stLinkCriteria
  2.  
  3. Forms!frmSchoolData.lstDistrict.Value = intDist 'set new form equal to menu value
  4. Forms!frmSchoolData.lstSchool.Requery
  5. Forms!frmSchoolData.lstSchool.Value = intSchool 'set new form equal to menu value
  6. Forms!frmSchoolData.lstSchool.Requery
  7.  
this code works and all data is displayed correctly. however, the text of lstSchool does not Requery and the text remains the same. how do i get the text to update?
Dec 10 '07 #1
2 1662
MMcCarthy
14,534 Expert Mod 8TB
What is the SQL statement that lstSchool is set to?
Jan 8 '08 #2
What is the SQL statement that lstSchool is set to?
thanks, that got me looking at the problem in the right way.
Jan 11 '08 #3

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

Similar topics

9
by: TD | last post by:
I am trying to add transactions to my code. The original code worked fine until I followed an example to setup transactions, now the code does strange things, but no error messages. Could...
7
by: | last post by:
I fail to understand why that the memory allocated in the void create(int **matrix) does not remain. I passed the address of matrix so shouldn't it still have the allocated memory when it returns...
1
by: Ryan Ternier | last post by:
I have two listboxes, and allow users to move items between them via the following function: function SwitchList(fbox, tbox){ var arrFbox = new Array(); var arrTbox = new Array(); var...
0
by: Luis Esteban Valencia | last post by:
have a problem and I'm not sure how to handle/fix it. I have three listboxes on my page. The first listbox has a list of software products. When you select an item in the Products listbox, then...
2
by: salad | last post by:
This is a tip on how to speed up listboxes DRAMATICALLY. Persons that would benefit are those that are constantly updating the rowsource of a listbox/combobox in order to filter and sort the data...
2
by: php_Boi | last post by:
i have designed an application that is a dynamic submission form. i have text fields and listboxes. now i am able to retain the values of the listboxes when i populate the listbox "manually"(single...
1
by: =?Utf-8?B?QWxCcnVBbg==?= | last post by:
I have a form containing three AJAX UpdatePanels, two of which contain a pair of listboxes and a pair of buttons, with the third one containing a pair of radio buttons in a radiobutton list and...
0
by: Anil Gupte | last post by:
I am having some issues with Listboxes Here is my code: Dim DSContent As New DataSet DSContent = L3GContent.GlobalDataSet URLListBox.BeginUpdate() For Each dr As DataRow In...
1
by: runningsnake24 | last post by:
We are writing a program to check that a filled in Sudoku puzzle is solved correctly. We are required to use the Iterator and Iterable interfaces. The program uses a Cell class to represent each...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.