Command Button filter

Dazza666

Registered User.
Local time
Yesterday, 16:25
Joined
Aug 13, 2008
Messages
56
Hi,

i'm trying to run this in a command button as a filter

"[ID]=" & Me![ID] & " And " & "ClientRecord.EndDate Is Null"

there's no error or anyting but i'm being prompted to enter an EndDate when I click the button, I just need it to take me to the record where the EndDate is null without prompting, (there will only ever been one at any given time).

Thanks
 
1. Is EndDate a field in the form's record source? If not it must be to filter on it.

2. If it is a field in the form's record source you don't need to qualify it with a table name or query name unless you have two of the same field names from separate tables in the underlying record source.

3. "[ID]=" & Me![ID] & " And " & "ClientRecord.EndDate Is Null" Should be
"[ID]=" & Me![ID] & " And " & IsNull(Me!EndDate)
if you are setting this filter via code

4. If setting this filter via code you would use
Me.Filter = "[ID]=" & Me![ID] & " And " & IsNull(Me!EndDate)
Me.FilterOn = True
 
Great,

it wasn't in the record source, i've just added it has a hidden field

thanks for the help
 

Users who are viewing this thread

Back
Top Bottom