your report listbox will need the same valuelist or rowsource as used in your form.
If your report is opened from the form, you could pass this as an openarg for docmd.openreport, then in your report, have some code in the open event to populate your listbox from the openarg
Hi Ajax,your report listbox will need the same valuelist or rowsource as used in your form.
If your report is opened from the form, you could pass this as an openarg for docmd.openreport, then in your report, have some code in the open event to populate your listbox from the openarg
Thanks for replying. I want to pass the form listbox data to report listbox because i need to print it out.
I'm not sure whether valuelist or rowsourse i should choose.
I thought if i put in REPORT listbox = [Forms]![QMS]![roi] , report listbox should copy all the data from FORM listbox?
No, all that does is pull the value of single selected item. If nothing is selected or the listbox is multi-select then second listbox can't pull anything and will be Null. Regardless, if the second listbox has no RowSource then it has no data to display.
RowSource determines items in the list, the expression you used is in ControlSource.
Be aware listbox does not have CanGrow or CanShrink properties. It will have to be sized for the longest possible list of items you can expect to be returned by the RowSource. Consider using subreports instead.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
your rowsource type is either valuelist or table/query. If it is a valuelist, the rowsource will be something like '0ne;three;elephant;zoo'. If aquery it will be something like 'SELECT ID, Name from myTable'
Hi June / Ajax,No, all that does is pull the value of single selected item. If nothing is selected or the listbox is multi-select then second listbox can't pull anything and will be Null. Regardless, if the second listbox has no RowSource then it has no data to display.
RowSource determines items in the list, the expression you used is in ControlSource.
Be aware listbox does not have CanGrow or CanShrink properties. It will have to be sized for the longest possible list of items you can expect to be returned by the RowSource. Consider using subreports instead.
I'm beginner on Access. Need some time to learn more on this.
Please look at the attachment. The problem i actually faced is i couldn't fit the QMS into 1 form.
I'm fine to make it 2 pages when export to PDF file. But the title and header must be the same.
Attachment is what i get and i need to improve it. Any alternative way to improve it?
This is From the form direct export to PDF.
1234 Record2.pdf
If info needs to be repeated on each page then put it in Page Header or Footer section. Label controls for the fields could be in Header section.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.