473,779 Members | 1,913 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Jump to record in listbox

Hi!

I wasn't very clear, I think...

On frmItems I have a listbox, lstShowItems, that is being filled up
in the forms onload event with all records from tblItems.

Now when user navigate between records I did wish the cursor would
jump to the actual ItemID and select it in the lstShowItems.

I have searched the group, and I think this is impossible with the
present listbox component in ms access 2000?

Anybody that have a workaround of this?

Me.Name
Nov 13 '05 #1
2 2377
I can't think of any way to do this off the top of my head that doesn't
involve iterating through the list items to find out where the record is in
the list (at position i), then calling:

Me.lstShowItems .Value = Me.lstShowItems .ItemData(i)

Of course, I've never had a need to do that, since I use the listbox to
navigate between records, not the other way around.
Darryl Kerkeslager
"Geir Baardsen" <ge***********@ hotmail.com> wrote:
On frmItems I have a listbox, lstShowItems, that is being filled up
in the forms onload event with all records from tblItems.

Now when user navigate between records I did wish the cursor would
jump to the actual ItemID and select it in the lstShowItems.

I have searched the group, and I think this is impossible with the
present listbox component in ms access 2000?

Anybody that have a workaround of this?

Me.Name

Nov 13 '05 #2
ge***********@h otmail.com (Geir Baardsen) wrote in
news:35******** *************** ***@posting.goo gle.com:
On frmItems I have a listbox, lstShowItems, that is being filled up
in the forms onload event with all records from tblItems.

Now when user navigate between records I did wish the cursor would
jump to the actual ItemID and select it in the lstShowItems.

I have searched the group, and I think this is impossible with the
present listbox component in ms access 2000?

Anybody that have a workaround of this?


Havent used Access so much lately but i have done somthing like this is
Access 97.

On the Forms OnCurrent event do something like:
lstShowItems.It emId = Formname.ItemId

lstShowItems need to have a column named ItemID, You can hide it if you
want.

On your form you will need to have access to the ItemId corresponding to
the ItemId in the lstShowItems.

Hope this is what you want and that it works.

--
Rolf

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
11189
by: ChrisR | last post by:
Hi guys My app is a simple Main form with a few Subforms that are not linked, and a few pop forms. Problem is: I have a pop form with a Listbox with a list of records related to the subform in the Main form. I'd like to double click on the selected file in the listbox and load that record into the the Subform, easy
5
3373
by: Bob | last post by:
Hi Everybody I have a form called frmListBox that is connected to a table tblListBox. This is opened from a form called "frmInvoiceOrder" which has a subform called "zfrmInvoiceOrder" and floats above (ie is pop-up) ! Private Sub ListBox_DblClick(Cancel As Integer) DoCmd.OpenForm "Forms!!!.Form! = Me!ListBox.Column(1) Forms!!.Form! = Me!ListBox.Column(2)
1
6685
by: Geir Baardsen | last post by:
Hi! On frmItems I have a two listboxes. The first, lstAllCategories, is loaded with data from tblCategory when frmItems open. When user click lstAllCategories, the lstSelectedItems will show all records for that category. Now when user clicks chosen item in lstSelectedItems, textboxes in form will be filled and now user can edit the selected item.
1
2793
by: SuffrinMick | last post by:
Hi All I have two tables: tblRecords and tblOptions. tblRecords consists of RecordID (autonumber), Record (text) and Option (text record of options chosen) fields tbloptions consists of OptionID (autonumber) and Option (text) fields. I want to use a form to add/update the records table.
3
2528
by: Sarah Smith via AccessMonster.com | last post by:
I am creating a database of documents that need to be worked on, are int eh proress of being worked on, and have been completed. Sometimes the same document (an updated version) comes back for more work. I am keeping all the info in one table and using an Index numberas my Primary Key. I have a form based on this table with a Findrecord button (used the Command Button Wizard for this) that populates the form when it finds the particular record....
6
3803
by: MLH | last post by:
When the vehicle entry form (frmVehicleEntryForm) first opens, the additional owner SubForm control (frmAddnlOwnrListSubForm) is enabled. You can click on it and it will accept the focus. But after you enter data to the first field on the main form (a VIN#), that is not the case. The SubForm control becomes disabled and will not accept the focus. Dunno why. There's no child/master link fields. They have no settings - at least not in design...
6
7989
by: MarkoBBC | last post by:
Hi everyone, First a brief description of my form: I have a subform within a main form. In my subform, I have a listbox displaying address information by firm name. A user first has to select a firm name in a combo box above the list box. The listbox and the combo box join on firm name. The listbox records what address was selected in the address table by the way of an address id number. I set up a macro to requery the listbox when you...
0
1438
by: scartin | last post by:
Hi, I have a multi-select ListBox that shows 5 rows at a time, but contains possibly a hundred or more items. As I retrieve relevant data from the database, I set the SelectedIndex of the rows matching the value for the current entry, and those show up as selected in the ListBox without any problems. However it is entirely possible, even likely, that the first selected index in the ListBox will not be in the first several items in...
1
4030
by: Sunray | last post by:
I have a form called the sales form and i have 2 sets of listboxes So what happens is. i add items form the bottom set of list boxes which are bound to a data base to the top set of list boxes which are not bound, I select from the bottom set and add to the top set which works fine, but now i decide to remove an item from the top set. when i tried to use a remove item code it worked fine, it did delete the item form the list but it added...
0
9636
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
10306
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10074
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
9930
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...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
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
5373
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...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2869
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.