Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 53
  1. #16
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    Not really. The names are quite cryptic and don't convey much in business terms. The names are probably fine for your needs.
    I suggest you look for and watch some youtube tutorials on Report OpenArgs, and/or


    Report Filters. Find a simple sample (martin green's stuff could apply) and work through it to understand the basics.

    Try this one.


    For testing/learning -Can you set up a query that selects all PurchaseNumbers, then add criteria to restrict the results to a single PurchaseNumber? You could use a parameter to identify the single record you want. The concept is similar; technique varies.

  2. #17
    kdtrimble is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    41
    ok, thank you all for your help.

  3. #18
    kdtrimble is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    41
    I am trying to limit this with a combo box (would prefer a text box). This is the code in form PONUM.
    PPCPO is the control box
    PO_Receipt_lable is the report
    [forms]![PONUM].[PPCPO]

    Am I missing something in the report? Here is the only code I have:

    Option Compare Database

    Private Sub Command0_Click()
    DoCmd.OpenReport "PO_Receipt_Label", acViewPreview
    End Sub


    Thank you.

  4. #19
    kdtrimble is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    41
    Here is the Record Source.

    SELECT dbo_HPOHD.HHPO, dbo_HPOHD.*, dbo_HPODT.HDJOB, dbo_HPODT.HDDESC, dbo_JHEAD.JHPART, dbo_UHPOHD.TOCUID, dbo_JHEAD.JHJOB, dbo_HPODT.HDPO FROM ((dbo_HPOHD INNER JOIN dbo_HPODT ON dbo_HPOHD.HHPO=dbo_HPODT.HDPO) INNER JOIN dbo_JHEAD ON dbo_HPODT.HDJOB=dbo_JHEAD.JHJOB) INNER JOIN dbo_UHPOHD ON dbo_HPODT.HDPO=dbo_UHPOHD.TOPO WHERE (((dbo_HPOHD.HHPO)=[Forms]![PONUM].[PPCPO]));

  5. #20
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    This is a reformat of your recordsource SQL
    Code:
    SELECT dbo_HPOHD.HHPO
        ,dbo_HPOHD.*
        ,dbo_HPODT.HDJOB
        ,dbo_HPODT.HDDESC
        ,dbo_JHEAD.JHPART
        ,dbo_UHPOHD.TOCUID
        ,dbo_JHEAD.JHJOB
        ,dbo_HPODT.HDPO
    FROM (
               (
            dbo_HPOHD INNER JOIN dbo_HPODT ON dbo_HPOHD.HHPO = dbo_HPODT.HDPO
               ) INNER JOIN dbo_JHEAD ON dbo_HPODT.HDJOB = dbo_JHEAD.JHJOB
           )
    INNER JOIN dbo_UHPOHD ON dbo_HPODT.HDPO = dbo_UHPOHD.TOPO
    WHERE (((dbo_HPOHD.HHPO) = [Forms]![PONUM].[PPCPO]));

    Please tell us what each of these tables represents so we have some feel for your data.

    dbo_HPOHD
    dbo_HPODT
    dbo_JHEAD
    dbo_UHPOHD

    This dbo_HPOHD.* represents all fields in table dbo_HPOHD -- so you don't need this dbo_HPOHD.HHPO also????

    Did you watch the video http://www.datapigtechnologies.com/f...mtoreport.html ?

    Again, tell readers in plain English, what you are trying to accomplish.

  6. #21
    kdtrimble is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    41
    dbo_HPOHD Purchase Order Header file (pulls Purchase Order Number HDPO)
    dbo_HPODT Purchase Order Detail file (pulls Purchase Order Part Description HDDESC)
    dbo_JHEAD Job Header file (pulls Work Order Number HDJOB and Job Part Number JHPART)
    dbo_UHPOHD VF Purchase Order Header file (pulls Customer ID TOCUID)

    I would like our users to be able to enter a purchase order number in a text box, hit enter and then label report will be generated for just that one Purchase Order.
    The report PO_Receipt_Label works well when I run it without the form but of course it prints ALL the records. I want form PONUM to just print the one chosen record.

    Not sure what you mean here<<This dbo_HPOHD.* represents all fields in table dbo_HPOHD -- so you don't need this dbo_HPOHD.HHPO also????>>

    Thank you.

  7. #22
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    Not sure what you mean here<<This dbo_HPOHD.* represents all fields in table dbo_HPOHD -- so you don't need this dbo_HPOHD.HHPO also????>>
    If you want to see (select) all fields in dbo_HPOHD then you use dbo_HPOHD.*. And the field dbo_HPOHD.HHPO would be included in the selection. Why would you need to select dbo_HPOHD.HHPO individually, if you have already selected all fields in dbo_HPOHD?

    If you take the recordsource SQL, and instead of using [Forms]![PONUM].[PPCPO], you enter the PONum you want to see (hard coded), and you put that revised SQL into the query grid (SQL View) and run the query - do you get the data for that PONum????? All the data you would normally get on the desired report?

    Did you watch the video from Datapig?

  8. #23
    kdtrimble is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    41
    I get all the data I need. Yes, I watched Datapig's video over and over again. but I seem to be missing something for the FORM to isolate the one record I want.

    When we receive a shipment from a supplier, there are multiple purchase orders on that truck. Our plant manager would like to enter the one PO, hit ENTER and then the label prints out for that PO only. Then he enters another PO and that label should print out.

    Here is a screen shot of ALL the records printing.
    https://plus.google.com/u/0/b/105778...67933273666026

  9. #24
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    I suggest you start with a simple example, and then, once you have it working, move to a more complex set up.

    How about just using 2 tables and setting up a form to get "selected info" as a test?
    Say your PO header and PO Detail tables.

    Can you show these table structures -all fields?

  10. #25
    kdtrimble is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    41
    Here is the link for the two Tables

    I have the tables now imported but have not made the form yet. Can you see these fields ok?

  11. #26
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    Can you export and post your 2 tables as csv files? I really don't want to type that all in.

    You could just create a demo database. Then import those 2 files into the data base, then post a copy of that demo database. That way I'd have the same database as you.

  12. #27
    kdtrimble is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    41
    Does this work?

    HPOHD
    HPODT

  13. #28
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    I have to get your permission to read the files??
    Might have been easier just to use the Go Advanced button and then upload your file(s) within this forum's facility.

  14. #29
    kdtrimble is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    41

  15. #30
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    no field names??
    Would like field names as first row in the csv in order to import into my tables.
    Perhaps the demo database approach where you import these 2 tables would be quicker.

Page 2 of 4 FirstFirst 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 02-21-2015, 11:35 PM
  2. Replies: 2
    Last Post: 02-07-2015, 04:30 PM
  3. Replies: 14
    Last Post: 01-08-2015, 04:50 PM
  4. Print single label
    By Voodeux2014 in forum Access
    Replies: 2
    Last Post: 11-12-2014, 01:52 PM
  5. Print Label when certian condition is met.
    By talktime in forum Reports
    Replies: 3
    Last Post: 12-15-2012, 03:26 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums