Not sure if problem is report or form

huertalm

Registered User.
Local time
Yesterday, 22:40
Joined
Feb 13, 2003
Messages
21
I built a database that keeps track of the school employees went to and the date they completed the school. i have built 3 reports. one called "byemployee" which shows just that employees info. another is called "byarea" which shows all the employees in that area and the schools they went to and date. the last one is called "byschool" and shows a list of everyone whose been to that school. i have created just one querie for all the reports. i made a form called "generatereport" that will prompt the user to select the area, school name or employee name to base the report on. i declared a public variable called "reportoption". on each report there is a number. example: report based on employee is reportoption 1, report based on area is reportoption 2 etc. when the user clicks on a report the report will load the form "generatereport". so if the area report is clicked on the "generate report" form will open and display only a combo box with a list of areas to allow the user to select an area. if the shool report is clicked then the "generatereport" form will display only the school combo box etc. the problem i am having is that after i view a report the form will not reset itself unless i completely close out of the form and reopen it. for instance if i click area the form will load up appropriately but if i close the area report and click on the school report it will still load up the form with only the area combo box. it seems to work fine the first time but then after that i have to completely close out the generate report form and reopen it so it resets itself. does anybody know what could be causing this?
 
Are you using 3 different combo boxes on your form or are you just using one combo box for all three? How are you getting your list for each combo box? From a table or are you typing in a list in the properties or do you get it from a query? I think I would use 3 separate combo boxes and set the visible property to no. When the user selects which box he wants to use make it visible ie. ComboBoxArea.Visible=True. If you do this you should add some code to the OnOpen Property which sets all your combo boxes to be not visible. Or you could reset the visible property to off after you make the selection. The key I think is to requery your combo box before you make it visible ie ComboBoxArea.Requery. I can help you with some of the code if you need it. Let me know what you are using for your lists on your combo boxes.

Sam Neff
 
fixed

i had three different combo boxes. they were set to not visible on form load and depending on the option the user chose, it would make certain ones visible. i added a macro on the reports' on close option that closes the form. so the problem is fixed. thanks anyway!
 

Users who are viewing this thread

Back
Top Bottom