Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox Woes on First DoubleClick

Status
Not open for further replies.

Sorrells

Programmer
Dec 28, 2000
92
0
0
US
This is going to sound strange and so it is. The problem is in Access XP.

I have a listbox on a form with the names of various room names for a house. The objective is to have the user double-click any of the room names and that room will be added to a subform that is updated to show the room's addition.

The problem arises when there are no rooms that have been added to the subform. This occurs when the form is first used or after all the rooms have been deleted from the subform.

When any room in the listbox is selected by a double click, Access does not pick up the string text. In the OnDblClick event the value for the listbox is null and a cryptic Access error is displayed. "0 - ".

After clicking ok, the form is available and there are no problems double clicking thereby adding rooms to the subform.

Is anyone familiar with this behavior?


Regards, Sorrells
 
I am not sure how this happens that a form can get so mucked up. It did on another form as well.

When I built a new form, copying over the controls and then the code behind the controls, replacing the old form, the problem was solved.

I have a concern with Access XP. It is often wanting to 'save changes' to form design and perhaps at times code when no changes have been made.

I may be working in the class module for a form then click on the save button and there are 3 forms in the Save Window. I don't remember making changes to any but one form. This is very distracting! It seems like for the most part, the additional forms to save are ones in design mode but have not been worked with.

Just about any form that I put in design mode, then close is a candidate for the "Save Changes in Design" regardless if they have been changed or not.

Regards, Sorrells
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top