Print Multiple Records

basilyos

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

i have a form that contains 10 textboxes

each file entered in the database will have a unique number that will be writed on the file

after this records will be printed

i want to enter the id in the textboxes sometimes one textbox somtimes 5 and maybe the 10

an when i click on print the records mentioned in the textboxes will be printed

i hope that i explained well

any help ?
 
Umm... not really.

If I understand you correctly, use a multiselect listbox containing the ID field
Then add code to the after update event of the listbox to print a report or query filtered to those values only.
 
you can concatenate the textboxes and use the
resulting concatenated string as a Filter Criteria
of your report:

Code:
dim strFilter As String

strFilter = Me.textbox1 & "," & Me.Textbox2 & "," & Me.TextBox3 & "," & Me.Textbox4 & "," & Me.TextBox5
While Instr(strFilter, ",,")<>0
	strFilter = Replace(strFilter, ",,", ",")
Wend

then you open your report:

DoCmd.OpenReport "yourReport",acViewPreview,,"id in (" & strFilter & ")"
 

Users who are viewing this thread

Back
Top Bottom