Filter propert on form uses form textboxes nopt table field names
Posted on 2011-03-24
I have two database systems.
In one when the user applies a filter to a form the filter property on the form is set using the forms control names
e.g. ([frmContacts].[contactTelephoneNumber] Like "*N/A*")
In the other the filter property is set using the table names
e.g.([tblClient].[CL_Name] Like "*Pa*")
Both forms are based on a query of one table - one the contact table one the client. table.
Remember both filters are set from the ribbon - none of my code.
I need the filters to use the table names (so I can use the me.filter string in an sql command to append to a table e.g.
DoCmd.RunSQL "Insert Into ContactsForMailMerge Select * From tblClient Where " & Screen.ActiveForm.Filter
This works filne when the filter uses the table names but obviously not when it uses the form names.
Why are the two forms using different syntax for the same property?
By the way if I copy the one using form names to the other database - it still uses form names.