Hide record from combobox

josros60

Registered User.
Local time
Today, 01:40
Joined
Mar 10, 2011
Messages
73
I have a form with combobox to find companies and in the form, also in the form there's a check box for terminated/inactive companies, how can I make it if the check box is checked not to show the company in the combobox and if want it to enable back, how?

The combo has afierce update macron.



Thanks
 
You can manipulate the row source of the combo:

Me.ComboName.RowSource = "SELECT * FROM TableName WHERE Terminated = 0"
 
Last edited:
thanks.

I tried but didn't work.

the combo has after udpae macro.

and here it's the query based on:

Code:
SELECT [Contacts Extended].[ID], [Contacts Extended].[Contact Name], [Contacts Extended].[Company], [Contacts Extended].[E-mail Address]
FROM [Contacts Extended]
WHERE ((([Contacts Extended].[ID])<>Nz([Form]![ID],0)))
ORDER BY [Contacts Extended].[Contact Name];

how can i do it.

thanks.
 
include you checkbox (equivalent fieldname) in your query.

SELECT [Contacts Extended].[ID], [Contacts Extended].[Contact Name], [Contacts Extended].[Company], [Contacts Extended].[E-mail Address]
FROM [Contacts Extended]
WHERE ((([Contacts Extended].[ID])<>Nz([Form]![ID],0))) And Not (booleanField)
ORDER BY [Contacts Extended].[Contact Name];
 
one question,

is this (booleanField) the checkbox field name?


thanks
 
Yes, the full form reference to it.
 

Users who are viewing this thread

Back
Top Bottom