By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,665 Members | 1,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,665 IT Pros & Developers. It's quick & easy.

Preivewing selected records in a report

P: 19
hello all!!!!
i have a program of voucher entry....
there are many records in the table Payment and voc_no is a primary key and auto numbered...
now i want only selected records to appear in my report....
like voc_no 1,4,6 on one day
or 7,8,11 on the other....
how should i do that....plz help me out with my query
May 4 '07 #1
Share this Question
Share on Google+
7 Replies


Rabbit
Expert Mod 10K+
P: 12,382
How do you determine which ones to view? Does it follow some algorithm or is it up to the user?
May 4 '07 #2

P: 19
How do you determine which ones to view? Does it follow some algorithm or is it up to the user?
it is upto the user which record to view.... for the time being i am using Between command in my query but that will display all records from X to Y...
i dont want that....
plz guide me if there is a solution to it....
i will be very greatful
May 5 '07 #3

Rabbit
Expert Mod 10K+
P: 12,382
One way would be to have a checkbox in your table so that they can check which ones you want to print, then you can just query for those.
May 5 '07 #4

P: 19
One way would be to have a checkbox in your table so that they can check which ones you want to print, then you can just query for those.
Isnt there any other option where the user types the record number and it previews the report
May 6 '07 #5

Rabbit
Expert Mod 10K+
P: 12,382
Isnt there any other option where the user types the record number and it previews the report
There is, you'll need to write a sub or procedure that will takes a string in a defined structure and then write a filter statement by breaking down the string to find out which records they want.
May 6 '07 #6

P: 19
There is, you'll need to write a sub or procedure that will takes a string in a defined structure and then write a filter statement by breaking down the string to find out which records they want.
well i am sorry to ask this but can u plz tell me how will i write the code as i cant figure it out.
May 8 '07 #7

Rabbit
Expert Mod 10K+
P: 12,382
If you have no VBA experience then you'll want to take a look at this tutorial.

If you have experience, then the easiest thing would be to have them enter the records in a strictly defined format. I recommend comma delineated for ease. But I suppose you can use any other delimiter but you'll just have to use replace() to change them to commas. After that it's just a matter of opening the report using the WhereCondition parameter built with In () and the string.
May 8 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.