Form Filter Problem

MaxJam

New member
Local time
Today, 00:04
Joined
Dec 16, 2003
Messages
5
Tools:
Access 2000
VBA
SQL Server 2000
-------------------------------------

Problem:
I Have 2 forms (form1 and form2).

Form 1 calls form 2....

Now at the start form 2's "filter" and "server filter" properties are empty.

I have 2 questions.... what do the filter and server filter do??
why would form1 need to set them before calling form 2.....

Anyway... Somewhere both filters in form 2 get set to certain criteria...

now i dont do this myself at least not knowingly and i use the following code to call "form 2" from "form 1"
(i didnt write this bit, it was there already)
--------------------------------------------------------------------------

If (IsNull(Me![cbPrjKey])) Then
stLinkCriteria = "(([QuoteTbl].[AMKey]=" & Me![cbAMKey] & ") And ([QuoteTbl].[IsCurrent]=1))"



Else
stLinkCriteria = "(([QuoteTbl].[AMKey]=" & Me![cbAMKey] & ") And ([PrjKey]=" & Me![cbPrjKey] & ") And ([QuoteTbl].[IsCurrent]=1))"

End If

DoCmd.OpenForm "Form2", , , stLinkCriteria
--------------------------------------------------------------------------

Is this where the "filter" and "server filter" for form2 gets set??? it is causing me problems and at the minute i have a me.Filter = "" and me.ServerFilter = "" in the close event of Form2.

You see, the user loads form1 and selects a record to view, form 2 loads and displays the record chosen in full... now normally in the close event of form2 (above) the filters are reset and they can choose a different record to view and form1 will then call form2 again and the correct record will load.

Sometimes a user will be working away happily on form2 and it will go a bit mad or crash or something like that (why i dont know!!) and the filters will actually be saved and all my work useless because i have to go to that users client and go into the design mode and physically reset them again. ARG!!! so annoying when you have many users.

IM ALL FILTERED OUT! please help any advice on the use of filters is appreciated.
 
On the load of form 1 can you not just set
me.Filter = "" and me.ServerFilter = ""

or am i missing something here
 
hmmm...
you got me thinking now.... do you mean.,...
i could set form 2's filter and serverfilter to "" on form 1 where i call form 2 using the docmd.openform function??? might actually work that! il give it a shot... thanks, i wont know until another user manages to make it fall flat on its face, next release bug fix methinks :D

cheers.
 

Users who are viewing this thread

Back
Top Bottom