Connecting Tech Pros Worldwide Forums | Help | Site Map

Select multiple records for printing

Newbie
 
Join Date: Aug 2007
Posts: 13
#1: Dec 18 '08
I am working on small database, which has a number of thousand records in one table. I need to print those (a hundred records or less) a time. I think that i should have one form for input the data, another form for selecting record for printing. In the second form i woulk like to type each UserID and the UserID should store in a list box or any object that i can verify before printing its (in report). How can i do ? please advice me step by step.

Your respond are highly appreciated.

msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,885
#2: Dec 18 '08

re: Select multiple records for printing


Do you mean type in 100 userID's at a time? This does not seem very user friendly. Have you no other criteria by which to choose which records you want to print?
Newbie
 
Join Date: Aug 2007
Posts: 13
#3: Dec 20 '08

re: Select multiple records for printing


Yes, it seems that user type each ID at a time in text box. After they click on return key, that ID should store in one object (ie. list box in order to verify) and the text box is blank, then they start type another ID until they get all they wanted. I think that this way is not user friendly, but it will make confusion or mess up when user browses around 5000 records and select 100 records or less . Thank you again.
Newbie
 
Join Date: Aug 2007
Posts: 13
#4: Dec 20 '08

re: Select multiple records for printing


Or any possible way, please.
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,885
#5: Dec 20 '08

re: Select multiple records for printing


Quote:

Originally Posted by Nhoung Ar View Post

Or any possible way, please.

The basics of what you want to do are this.

Assuming controls ... command1 (button), List1 (Listbox) and Text1 (Textbox) the code on the button would be as follows:

Expand|Select|Wrap|Line Numbers
  1. Private sub command1_Click()
  2. Dim strList as String
  3.  
  4.     strList = Me!List0.RowSource
  5.     Me!List0.RowSource = strList & ";" & Me!Text1.Value
  6.     Me!List0.Requery
  7.  
  8. End Sub
  9.  
Newbie
 
Join Date: Aug 2007
Posts: 13
#6: Dec 20 '08

re: Select multiple records for printing


Thank you very much for your respond. I will try it.
Reply