Exclude Records for printing (1 Viewer)

nathanmav

Registered User.
Local time
Today, 10:03
Joined
Nov 7, 2012
Messages
30
hi everyone just want to ask on how to exclude a record based on the value of listbox by selecting the record that i dont want to appear in the report.. the listbox is connected to a table.. thanks in advanced
 

RainLover

VIP From a land downunder
Local time
Tomorrow, 03:03
Joined
Jan 5, 2009
Messages
5,041
In your Query you would use as your criteria <> to the List Box.

That is about all I can say without further information. But what I said should give you the result you want.
 

nathanmav

Registered User.
Local time
Today, 10:03
Joined
Nov 7, 2012
Messages
30
In your Query you would use as your criteria <> to the List Box.

thank you for your reply.. what will i put in the criteria? the name of the listbox? like this: criteria = lstExclude.
 

RainLover

VIP From a land downunder
Local time
Tomorrow, 03:03
Joined
Jan 5, 2009
Messages
5,041
I will try and walk you through this so that you can repeat the process for similar situations.

First open your query in design view.

On the left side of the query you should see. Field, Table, Sort, Show, Criteria. This depends on the version you are using. I am using 2003.

Under the Field that you wish to filter and on the Criteria line enter <> for Not Equal to.

Then right click in that field and click on build. Navigate to the List box. To do this open Forms. If it is open then select Loaded Forms, if not All Forms. Click on the Form you are searching for. In the next Column you should be able to find the list Box Name. Double Click on that. It should now show at the top of the Expression Builder. (The box you have open) Click OK. The expression should show in the criteria of the query.

Have a go.

If you run into problems post back with a clear description of what you did and what you think went wrong.

Or post a cut down version of you Database. The FAQs has instructions on how to do that.

But PLEASE attach a 2003 Version. I cannot help with 2007 or 2010.

If you can't convert then post anyway. Some one else will take over.
 

nathanmav

Registered User.
Local time
Today, 10:03
Joined
Nov 7, 2012
Messages
30
i follow your instruction.. but nothing happen i attach the sample im working.. there is a form with a listbox that shows all the records. what im trying to do is select the record that i dont want to show in the report but i dont get the code for that... this was made in ms access 2010.. thanks
 

Attachments

  • test.zip
    624.7 KB · Views: 81

RainLover

VIP From a land downunder
Local time
Tomorrow, 03:03
Joined
Jan 5, 2009
Messages
5,041
I did say "But PLEASE attach a 2003 Version. I cannot help with 2007 or 2010."

So I hope someone else takes over.
 

nathanmav

Registered User.
Local time
Today, 10:03
Joined
Nov 7, 2012
Messages
30
sorry for that.. i attach the 2007 version.. thank you
 

Attachments

  • test.accdb
    608 KB · Views: 71

nathanmav

Registered User.
Local time
Today, 10:03
Joined
Nov 7, 2012
Messages
30
sorry again.. even 2007.. anyway i will try to look for 2003 access and i will install it.. thank you.. or i will attach the screenshot.
 

RainLover

VIP From a land downunder
Local time
Tomorrow, 03:03
Joined
Jan 5, 2009
Messages
5,041
sorry again.. even 2007.. anyway i will try to look for 2003 access and i will install it.. thank you.. or i will attach the screenshot.

You can use your current version to convert the file to 2003.

If you have problems then search Access Help.

Or you could attach a screen dump if you think that will explain everything.
 

nathanmav

Registered User.
Local time
Today, 10:03
Joined
Nov 7, 2012
Messages
30
here's the screenshot of what im trying to do.. the selected record should not appear in the report.. i don't know how to code it.. im still a newbie. thank you hope you can help me.
 

Attachments

  • pic.JPG
    pic.JPG
    41.3 KB · Views: 85

nathanmav

Registered User.
Local time
Today, 10:03
Joined
Nov 7, 2012
Messages
30
here's it is i already convert it to 2003.. thank you
 

Attachments

  • test.mdb
    372 KB · Views: 81

pwbrown

Registered User.
Local time
Today, 18:03
Joined
Oct 1, 2012
Messages
170
Will only 1 record be excluded or can multiple be excluded?
 

Users who are viewing this thread

Top Bottom