473,803 Members | 3,637 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TO Dependent listboxes on access forms

2 New Member
Hi,
I saw posts in Dependent listboxes on access forms, which problem is very similar to my.
I’m from Bulgaria and working over to create an MS Access application.
I used in my project given code :

Expand|Select|Wrap|Line Numbers
  1. Private Sub Country_AfterUpdate()
  2.     With Me![Region]
  3.         If IsNull(Me!Country) Then ' if no country is selected
  4.             .RowSource = ""  ' leave row source of Region blank
  5.         Else ' if country is selected
  6. ' populate the Region combo box with Regions where Country is as selected
  7.             .RowSource = "SELECT  RegionID, RegionName " & _
  8.                         "FROM tlkpRegion " & _
  9.                         "WHERE CountryID=" & Me.Country
  10.         End If
  11.         Call .Requery ' requery the region combo box to show the selection
  12.     End With
  13. End Sub
It is working OK but I have in addition next problem :

I have table, with next structure :

Table1
ID (Primary Key - AutoNumber)
CountryCode - contains country code
RegionCode - contains region code

I create Single Form, which Record Source is Table1
This form contains :
ComboBox1 - Country
ComboBox2 - Region

When I list the records with Record Selector only in last actualized records Combo boxes shows the names of country and region.
When I move between records forward or back only the value in ComboBox1 is visible.
ComboBox2 is empty. The value present in the table but the result is invisible.

Has anybody any idea what is wrong?

I will appreciate any help

Annivanova
Apr 6 '07 #1
0 1190

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

Similar topics

3
1710
by: Simon Templar | last post by:
I need the following functionality: With 2 listboxes populated from a database with the SAME data, I need any of the listboxes to stop displaying the option when selected at the other listbox. Eg: data records are A and B, and initially are available in both listboxes, but once the user selects A in the first listbox, the second one should only display B. Any reference?
2
1944
by: Justin Koivisto | last post by:
Firstly, I want to thank all that have helped me out with getting grips on Access each time I've had questions. This has got to be one of the most helpful groups that I've posted to over the years. Now my problem... I have a listbox that I want to use to fill in the where clause of a query. I've been able to create a string holding the necessary WHERE clause without many problems. However, I cannot seem to reference the string inside...
6
4631
by: Ralph2 | last post by:
Some time ago with a lot of help from this group I made a reasonably successful database to keep track of our shop drawings. However the searching mechanism is too complicated for the occasional user and I would like to change the whole process. I would like to duplicate the layout of my form... but each field becomes a simple "searching" ListBox. On completing any one search field all the rest are filtered to this value. Subsequent...
4
1916
by: bill yeager | last post by:
I have several template columns inside of a datagrid. Inside of these template columns are databound listboxes: <asp:TemplateColumn HeaderText="Crew Chiefs"> <ItemTemplate> <asp:listbox AutoPostBack="False" BackColor="#ffffff" id="lstCrewChief" runat="server" Rows="1" DataSource="<%# DsCrewChief1 %>" Enabled="True"
8
2588
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 courses are populated. When course is selected, lists of occurrences, groups and
3
10601
by: VB Programmer | last post by:
In VB.NET 2005 (winform) any sample code to drag & drop items between 2 listboxes? Thanks!
4
2562
by: Full NameEntry | last post by:
Hi all, I'm new to csharp... learning it by muddling my way though examples. In my current example, I'm trying to make a form with a bunch of listboxes that have drag and drop enabled amongst them... I found an example online in the form of a DragNDrop.cs file that I've included in my project (attached below).
14
2077
by: Ima Loozer | last post by:
OK folks I'll try to explain my objective as clearly as I can... Might be hard... I want a list box on one of my forms. List box will have the persons name in column 0. Next three columns will be blank (white) or the designated color for that column based on a true/false condition. These will be used as flags to indicate whether the person in that row of the list box has one or more of the three possible certifications. So that...
6
3506
by: Imicola | last post by:
Hi, I've recently been tasked with developing a database to store data which has been collected by a lot of different people. I have quite alot of access experience, but not that much on database development, so I'm learning quite a lot as I go along. My problem is that I need to keep information about locations. All the data we have has been collected in different villages. Each village belongs to a Parish, each Parish to a Sub...
0
9703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6842
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.