Link to home
Start Free TrialLog in
Avatar of Louverril
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].[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.


Thanks
Lou
ASKER CERTIFIED SOLUTION
Avatar of Bitsqueezer
Bitsqueezer
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Louverril
Louverril

ASKER

Thanks for that - will check it out in the next couple of days - O got sidetracked with something else but tomorrow this is back as priority 1.

I think I will have to use me.recordsetclone and create a table.

thanks Lou