Access 2000Runtime Search Problem (1 Viewer)

zunan

Registered User.
Local time
Today, 10:06
Joined
Mar 16, 2001
Messages
27
Thank you for any help anyone can suggest.
Example:
Table: "tblProjects" has 4 fields: Name, ProjectAssigned, PlaceAssigned, DateAssigned
Form: Continuous Form displays all records from tblProjects.In the form header, above each field there are combo boxes: cboName, cboProjectAssigned, cboPlaceAssigned, cboDateAssigned. Of course, each cbo is populated with a distinct list of values from the respective column of the table. The "AfterUpdate" event of each cbo is: DoCmd.ApplyFilter , "[FieldName] = Forms!MyForm!cboFieldName". The filters work beautifully. If I open the database from a shortcut with the "Runtime" switch, the form still works fine. When I package the database and distribute it, the runtime version will filter only once-the first time then thereafter yield a blank form. I have to close the form and reopen it to apply another filter.
I'm sorry this is so long, and again, Thank you to anyone who has suggestions.
Gail
 

Keith P

Registered User.
Local time
Today, 10:06
Joined
Oct 11, 2000
Messages
122
Before you apply the second and subsequent filters you need to refresh the underlying recordset otherwise you are filtering on an already filtered recordset. Look at the ShowAllRecords action.
 

zunan

Registered User.
Local time
Today, 10:06
Joined
Mar 16, 2001
Messages
27
This is exactly what puzzles me. I already have a "Show all records" command button on the form. Showing all records between filters doesn't correct the problem.
 

arye9

New member
Local time
Today, 10:06
Joined
Jan 15, 2001
Messages
9
Why don't you use a Tool Bar with a Sort Button?
 

zunan

Registered User.
Local time
Today, 10:06
Joined
Mar 16, 2001
Messages
27
I don't think either of you understand my problem. The entire seardh form works beautifully in full version A2K. It also works beautifully if I open it with the Runtime switch. If I package it up and install it on a pc that does not have anything but the runtime files, it will only apply the filter once. I then have to close out of the form and re-enter it to perform another search.
 

Keith P

Registered User.
Local time
Today, 10:06
Joined
Oct 11, 2000
Messages
122
Hi Gail
I do now understand your problem. I am not sure I know the answer. The blank screen suggests that you have no hits in your recordset after the second filter which further suggests that the "Show all records" command isn't working properly. Have you tried using Me.Requery instead of "Show all records".
 

zunan

Registered User.
Local time
Today, 10:06
Joined
Mar 16, 2001
Messages
27
Thanks Keith for your patience with me. I just tried Me.Requery and that yields a bank screen in the full version of A2k. I'm afraid to find out what will happen when I package it up. What puzzles me the most is that when I open the dbase in the runtime environment (using the switch) the filters work beautifully. I have the feeling that there is some small dll or what-not that is present because I have full A2k that doesn't go into the package.
 

Keith P

Registered User.
Local time
Today, 10:06
Joined
Oct 11, 2000
Messages
122
Hi Gail
I tried what you are doing with slightly different code and it works fine both in full A2k and as a packaged mde.
Try replacing the "AfterUpdate" event of each cbo with

Me.Filter = "[FieldName] = " & me!cboFieldName
Me.FilterOn = True

If it still doesn't work let me know and I can email you the packaged setup.lst file to look for potentially missing dlls.
 

Users who are viewing this thread

Top Bottom