Louverril
asked on
Filter propert on form uses form textboxes nopt table field names
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].[contactTel ephoneNumb er] 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.
Thanks
Lou
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].[contactTel
In the other the filter property is set using the table names
e.g.([tblClient].[CL_Name]
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.
Thanks
Lou
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think I will have to use me.recordsetclone and create a table.
thanks Lou