Ask Your Question
0

Listbox problem in Base form

asked 2019-05-27 15:20:00 +0200

dougcb68 gravatar image

I am attempting to create a base form wherein the user selects parameters to be used in formulating an SQL search string. The form contains five check boxes. When a checkbox is selected a list box is revealed with the options related to that checkbox. The form works for the first two check boxes, but when a third check box is selected one of the other list box contents is deleted. Being completely unable to track down the source of this behaviour I turn to thee community for help. I have attached an .odb file of the database exhibiting this problem: C:\fakepath\debugDB.odb

edit retag flag offensive close merge delete

Comments

Hello,

You certainly made this more difficult than needed for someone to look at. The presented sample is for a split database. When posting, either use an embedded database or include ALL parts needed in a zipped file (will need renaming). There is only a form. You need to supply a complete sample. Also, please indicate which specific LO version you are using and OS.

Ratslinger gravatar imageRatslinger ( 2019-05-27 18:48:51 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-05-27 20:47:58 +0200

Ratslinger gravatar image

Hello,

Notwithstanding information missing in the Base form provided, the problem was found (created dummy sample data for testing).

Your entire approach seems to be somewhat faulty. sqlMultiForm is attached to table person and the controls in that form are all pointing to blank fields. Even simple mouse clicks after any two selections is causing problems.

What you really have is a filtering situation which would eliminate much of the code you have created. Using a filter table, the selected item data is stored in the single record. When all selections are made, you can use the data in the record in a query to select the information desired. Don't really see any need for the check boxes, since you can accommate non selection by checking for null values in the query.

End result would be little if any coding.

For more on table filtering see this post -> Filter/Search with Forms (leveraging SubForms). It also includes many samples.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-05-27 15:20:00 +0200

Seen: 43 times

Last updated: May 27