×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Create report for each record in a datasheet subform

Create report for each record in a datasheet subform

Create report for each record in a datasheet subform

(OP)
My Pick List form has a combo to select a delivery date.

This is used to show all orders due for delivery on this date in a the top datasheet subform. Stepping down through this datasheet shows all of the current order's items in a second Datasheet subform, sfmPickListBarcodes.



I now want to create labels for items in the currently selected order, extracting their Product Names, Quantities and Barcodes that contain 'SI' and the OrderItemID.

So for OrderID 151206 I want the report to generate 3 labels showing Maldon Gold, SI233194, and 2 showing Jake, SI233195.

As a test I tried using this for the Command Button

CODE -->

With Forms!frmPickList.sfmPickListBarcodes.Form.RecordsetClone
        .MoveFirst
        Do Until .EOF
        Debug.Print sfmPickListBarcodes.Form.ProductName
        Debug.Print sfmPickListBarcodes.Form.Quantity
        .MoveNext
        Loop
        End With 

But this just repeated the name and quantity for the first row, not moving to the second.


RE: Create report for each record in a datasheet subform

How about:

CODE

With Forms!frmPickList.sfmPickListBarcodes.Form.RecordsetClone
    .MoveFirst
    Do Until .EOF
        Debug.Print !ProductName.Value
        Debug.Print !Quantity.Value
        .MoveNext
    Loop
End With 

If ProductName and Quantity are the fields' names of your RecordsetClone

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: Create report for each record in a datasheet subform

(OP)
Thank you so much, one small change that fixes it!




Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close