Go Back   Access World Forums > Microsoft Access Discussion > Forms

Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 07-01-2000, 10:27 PM   #1
Posts: n/a
Opening a form when selecting an item in Listbox

I am having trouble figuring out how to open a form when selecting an item in a listbox. I have created a variable in VB and tried to use it with the DoCmd.OpenForm. I have used the ItemSelected. Possibly I am missing something has anyone done this?

  Reply With Quote
Old 07-02-2000, 04:20 AM   #2
Junior Member
Join Date: May 2000
Location: pakistan
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to mir_99
Hi kmsdove!
If I am getting you right , you want to open a Form after when you select an item from a list box.
Is the item selected from the list box ,the name of the form to be opened? If it is ,then what you have to do is put the docmd.openform () statement in the afterupdate event of the list box.
please do reply if its not that what you want.
mir_99 is offline   Reply With Quote
Old 07-02-2000, 07:48 AM   #3
Posts: n/a
This is what I have...

First Form:

Has List box with a listing of items and the bound column is for example, PartID. The name of the listbox is lstParts. I want to be able to doubleclick on item and open a form with detailed information. I have a DoCmd.OpenForm now however, I can't get it to pass the PartID properly. I tried in the Where condition on the OpenForm using filter. Also, the PartID is I get with the ItemSelected and set a variable with the information to be passed. Its not working for some reason I must be doing something wrong.

I have code for the second form using the doubleclicked event.
The field in the second form that should receive the partID is called PartID.

  Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

All times are GMT -8. The time now is 10:40 AM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World