Form Filter will not delete

B

BillD

If anyone can help please explain this in simple terms and where I have to
look I am not that good at codes and programming yet

I have a form that is set up in a tab control with 4 tabs (contacts,
registration, registration payement, contributions) I have populated the data
base with only 2 entries so far.
When I open the form all the fields are empty and none of the command
buttons work. Once I go to records and select remove filter the first record
in the table contacts appears in the form and all the command buttons work.

When I go to Records - Filter - Advance Filter/Sort the field shows LastName
and the criteria shows Is Null AND Is Null
When I go to the form in design view the filter shows
(((tblcontacts.LastName Is Null))) AND ((tblcontacts.LastName Is Null))

I have tried to remove the form filter by deleting it and saving the form
and I followed the instructions in help to remove the record in Advance
filter/sort by highlighting and selecting clear grid. However when I close
the form and then reopen it the filters are back and they are populated
automatically.
I have no idea where to look to remove this.
Please help
Thanks
 
B

BillD

I think I have all this information you asked for.
I have a form with a tab control that has 4 tabs for 4 forms: fmcontacts,
fmregistration, fmregpayment, fmcontributions

All the forms use tables for a data source except for the fmregpayment that
uses a query. I checked that and there is no criteria listed only expressions
for making multiple calculations

I checked all the forms and under the current there is no code listed on any
of the forms.

On the form fmcontacts the filter shows (((tblcontacts.LastName Is Null)))
AND ((tblcontacts.LastName Is Null)) - This is all one line just as it is
typed.
I tried to delete this and then save the form, closed out the database. When
I reopened the database and the form the filter was back.

Also with the form open when I click on Records - Filter - Advance
Filter/Sort the field shows LastName and the criteria shows Is Null AND Is
Null.
I followed the instructions in help which said to highlight the field and
click on clear grid. I did this but when I open the form back up the filter
is back again.

I checked all of my queries and all of them are used only in reports: There
are 4 queries that have criteria set for either Yes or No and those are for
check boxes in my tables and forms. There is one query an Email contact List
query again for a report that has criteria "Is Not Null" for the contact
email and a query for snail mail that has criteria "Is Null" for contact
e-mail

I hope this explained everything ok. I just cannot figure out where else to
look for anything that would set criteria for a filter.
The fmcontacts code has nothing that I can find for filters all of the code
is for command buttons on the form. The switchboard has code for current it
reads as follows:
Private Sub Form_Current()
'Update the caption and fill in the list of options
Me.Caption=Nz(Me![ItemText], ""}
Fill Options
End Sub

Thanks again for taking the time to help
 
B

BillD

When I open the database the switchboard maximizes and to open the form I
click on a button for the form. I checked the properties for the button and
there is one line under the function: Event On Click =HandleButtonClick(3)

On checking the Visual Basic for the Form Switchboard I did find some code
with Filter in it. The first function is as follows

Private Sub Form_Open(Cancel As Integer)
'Minimize the database window and initialize the form.
'Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
Me.FilterOn= True
End Sub

The next place I found any mention of a filter is in a very large function
it starts out as follows

Private Function HandleButtonClick(IntBtn As Integer)

There are 9 items as follows: Const ConCmdGoToSwitchboard = 1 (repeats thru 9)
There are 3 Dim Commands
Set con
Set rs
St Sql
End If

Select Case rs! [Command]
'Go to Another Switchboard
Case ConCmdGoToSwitchboard
Me.Filter = "[ItemNumber] = 0 AND [SwitchboardID]=" & rs![Argument]

farther down there is one more

Case ConCmdCustomizeSwitchboard
Me.Filter = "[ItemNumber]= 0 AND [Argument]= 'Default' "

If you would like me to send you the entire code for that function please
let me know as I said I didn't do it now as it is a very long function
--
BillD


bhicks11 via AccessMonster.com said:
How are you opening the form? Is there any code there?

Bonnie
http://www.dataplus-svc.com
I think I have all this information you asked for.
I have a form with a tab control that has 4 tabs for 4 forms: fmcontacts,
fmregistration, fmregpayment, fmcontributions

All the forms use tables for a data source except for the fmregpayment that
uses a query. I checked that and there is no criteria listed only expressions
for making multiple calculations

I checked all the forms and under the current there is no code listed on any
of the forms.

On the form fmcontacts the filter shows (((tblcontacts.LastName Is Null)))
AND ((tblcontacts.LastName Is Null)) - This is all one line just as it is
typed.
I tried to delete this and then save the form, closed out the database. When
I reopened the database and the form the filter was back.

Also with the form open when I click on Records - Filter - Advance
Filter/Sort the field shows LastName and the criteria shows Is Null AND Is
Null.
I followed the instructions in help which said to highlight the field and
click on clear grid. I did this but when I open the form back up the filter
is back again.

I checked all of my queries and all of them are used only in reports: There
are 4 queries that have criteria set for either Yes or No and those are for
check boxes in my tables and forms. There is one query an Email contact List
query again for a report that has criteria "Is Not Null" for the contact
email and a query for snail mail that has criteria "Is Null" for contact
e-mail

I hope this explained everything ok. I just cannot figure out where else to
look for anything that would set criteria for a filter.
The fmcontacts code has nothing that I can find for filters all of the code
is for command buttons on the form. The switchboard has code for current it
reads as follows:
Private Sub Form_Current()
'Update the caption and fill in the list of options
Me.Caption=Nz(Me![ItemText], ""}
Fill Options
End Sub

Thanks again for taking the time to help
Is your data source a query? Does the query have any criteria? Is there
any code in OnCurrent of the form that might be setting the filter? What is
[quoted text clipped - 26 lines]
Please help
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top