what symbol can i use to bring all data

basilyos

Registered User.
Local time
Yesterday, 16:48
Joined
Jan 13, 2014
Messages
256
hello

i create a query to bring data from a table and then print a report that display this data

i put a criteria on the cities field to filter this query
it will take the name of the city from a txtbox in a specific form

everything is ok

but when i want to print all records with any city without filtering so the query

how can i do it
 
In criteria up or parameter is null

Where myfield =forms!myform!mytextbox or Forms!myform!mytextbox Is Null

Brian
 
Brianwarnock not working

my question is

for example i type in a textbox cityname 'Berlin' so i will get in my report all the records that have cityname 'Berlin'

so if i want to show all the records in my report what should i type in this textbox????

thanks in advance
 
first of all thank you for your reply

this is what i do

when i put forms!myform!mytextbox or forms!myform!mytextbox Is Null

the query take this part (forms!myform!mytextbox) and put it in a new column and Is Null in the (or) field

ok i think it will work

i open my form i type a city name and i open the report he give me all th records with the city i typed

i leave it blank he give me nothing

did i miss something??
 
btw i run the query manually and i leave the parameter blank she show all the records

this is the code that i put it in the onclick event

If DCount("*", "qry_Building_Violation_Accepted") > 0 Then
DoCmd.OpenReport "rpt_Buildings_Violation_Accepted", acViewPreview
Else
DoCmd.OpenReport "rpt_Buildings_Violation_Accepted_Empty", acViewPreview
End If

when i leave the txtbox blank and i click on the button she show me the empty report but if i type a city name she show me the first report


i'm using two report because the empty have another design
 

Users who are viewing this thread

Back
Top Bottom