Snowflake68
Registered User.
- Local time
- Today, 23:18
- Joined
- May 28, 2014
- Messages
- 464
[SOLVED] I have a form which is bound to a query (which queries a table called 'dbo_QnRegDetail')
I have a field called 'Status' which contains values of either 'Open' or 'Closed'
I want to be able to filter the results in the datasheet of the form by selecting the status from a combo box. I have this working using the following code in the criteria of a query.
However I want to be able to see 'All' records so I have added the value 'All' to the combo box list and changed the query to the code below but it doesnt show any records when I change the combo box to 'All'. I have been playing around with the code and it would appear that it doesnt like the wildcard bit.
Any ideas?
I have a field called 'Status' which contains values of either 'Open' or 'Closed'
I want to be able to filter the results in the datasheet of the form by selecting the status from a combo box. I have this working using the following code in the criteria of a query.
Code:
[Forms]![frmMain]![NavigationSubform].[Form]![cboStatus]
However I want to be able to see 'All' records so I have added the value 'All' to the combo box list and changed the query to the code below but it doesnt show any records when I change the combo box to 'All'. I have been playing around with the code and it would appear that it doesnt like the wildcard bit.
Code:
Like "*"
Code:
IIf([Forms]![frmMain]![NavigationSubform].[Form]![cboStatus]="All",([dbo_QnRegDetail].[Status]) Like "*",[Forms]![frmMain]![NavigationSubform].[Form]![cboStatus])
Any ideas?
Last edited: