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

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 2356
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***********@hotmail.com (Geir Baardsen) wrote in
news:35**************************@posting.google.c om:
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.ItemId = 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
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...
5
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...
1
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...
1
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...
3
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...
6
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...
6
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...
0
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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.