Options Group for filter Query?

A

Anne

I have a query which checks if a jobno has been copied from Quickbooks.
To show just the customerName which has not been copied from Quickbooks, all
I need to show in the query the criteria: is null.
I am trying to get this query onto a form, where an options group would let
the user select either all jobs or only those where the customer name is null.
I just can't an options group to work.
 
O

Ofer Cohen

Hi Anne
You can use one query to do the job, with reference to option group


SELECT cboCustomersQB.*
FROM cboCustomersQB
WHERE customerno = IIf([forms]![FormName]![Frame24]=1,[customerno] Is
Null,[customerno])

On the after update event of the opion group, run
Me.Requery
 
A

Anne

I don't understand where I am supposed to put this.
I have a query cboCustomersQB, which has a field called Customername.
Where would I put your code?

Ofer Cohen said:
Hi Anne
You can use one query to do the job, with reference to option group


SELECT cboCustomersQB.*
FROM cboCustomersQB
WHERE customerno = IIf([forms]![FormName]![Frame24]=1,[customerno] Is
Null,[customerno])

On the after update event of the opion group, run
Me.Requery


--
Good Luck
BS"D


Anne said:
I have a query which checks if a jobno has been copied from Quickbooks.
To show just the customerName which has not been copied from Quickbooks, all
I need to show in the query the criteria: is null.
I am trying to get this query onto a form, where an options group would let
the user select either all jobs or only those where the customer name is null.
I just can't an options group to work.
 
O

Ofer Cohen

It's not a code, it's can be used as the form record source.
So instead of the code you had on the after update of option group, you can
run
Me.Requery

--
Good Luck
BS"D


Anne said:
I don't understand where I am supposed to put this.
I have a query cboCustomersQB, which has a field called Customername.
Where would I put your code?

Ofer Cohen said:
Hi Anne
You can use one query to do the job, with reference to option group


SELECT cboCustomersQB.*
FROM cboCustomersQB
WHERE customerno = IIf([forms]![FormName]![Frame24]=1,[customerno] Is
Null,[customerno])

On the after update event of the opion group, run
Me.Requery


--
Good Luck
BS"D


Anne said:
I have a query which checks if a jobno has been copied from Quickbooks.
To show just the customerName which has not been copied from Quickbooks, all
I need to show in the query the criteria: is null.
I am trying to get this query onto a form, where an options group would let
the user select either all jobs or only those where the customer name is null.
I just can't an options group to work.
 
A

Anne

Ofer, please have patience with me.

I put this as record source of the form:
SELECT cboCustomersQB.* FROM cboCustomersQB WHERE
((([CustomerNO])=IIf([forms]![SfrmCustomerQB]![Frame24]=1,[customerNO] Is
Null,[customerNO])));

If I remove the previous after update event of Frame24 and replace it with
me.requery I only get an empty line, where I have about 8 records without a
customerNo.
Thanks,
Anne



Ofer Cohen said:
It's not a code, it's can be used as the form record source.
So instead of the code you had on the after update of option group, you can
run
Me.Requery

--
Good Luck
BS"D


Anne said:
I don't understand where I am supposed to put this.
I have a query cboCustomersQB, which has a field called Customername.
Where would I put your code?

Ofer Cohen said:
Hi Anne
You can use one query to do the job, with reference to option group


SELECT cboCustomersQB.*
FROM cboCustomersQB
WHERE customerno = IIf([forms]![FormName]![Frame24]=1,[customerno] Is
Null,[customerno])

On the after update event of the opion group, run
Me.Requery


--
Good Luck
BS"D


:

I have a query which checks if a jobno has been copied from Quickbooks.
To show just the customerName which has not been copied from Quickbooks, all
I need to show in the query the criteria: is null.
I am trying to get this query onto a form, where an options group would let
the user select either all jobs or only those where the customer name is null.
I just can't an options group to work.
 
Top