Results 1 to 2 of 2
  1. #1
    FoolzRailer is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    51

    Topic has attachmentsExporting Two Tables By Criteria Input, Have Too Type In Criteria Twice

    Hello

    I'm using transferspreadsheet for exporting a few tables. When I export the tables I get prompted to input a project name/criteria, which is as it should be. However I'm currently having to type the same ProjectName in four times, is there any way to call the first project name I enter?

    Code:
    SELECT Saneres.Projektnavn AS Projektnavn, Saneres.OpstrømsKnudeNavn AS OpstrømsKnudeNavn, Saneres.NedstrømsKnudeNavn AS NedstrømsKnudeNavn, Saneres.Opstrømsdybde AS Opstrømsdybde, Saneres.Nedstrømsdybde AS Nedstrømsdybde, Saneres.Afløbstype AS Afløbstype, Saneres.Lokalitet AS Lokalitet, Saneres.Længde AS Længde, Saneres.Diameter AS Diameter, Saneres.Ledningsmateriale AS Ledningsmateriale, Saneres.Stationering AS Stationering, Saneres.TVObsKode AS TVObsKode, Saneres.TVObsKlasse AS TVObsKlasse, Saneres.Type1 AS Type1, Saneres.Type2 AS Type2, Saneres.FysiskIndeks AS FysiskIndeks, Saneres.SaneringsmetKode AS SaneringsmetodeKode, Saneres.LedningsID AS LedningsID, Saneres.DelledningsID AS DelledningsID
    
    FROM Saneres
    
    WHERE (((Saneres.Projektnavn)=[Indtast Projektnavn]))
    
    ORDER BY Saneres.LedningsID;
    Click image for larger version. 

Name:	Criteriainput.jpg 
Views:	6 
Size:	145.7 KB 
ID:	25454

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    presumably this is happening because you are using transferspreadsheet 5 times?

    Solution is on your form to have a field where you enter the project name, then have your queries reference the form instead - something like


    WHERE (((Saneres.Projektnavn)=forms!formnamehere![txtProjektnavn]))

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Criteria based on user input
    By vincentsp in forum Queries
    Replies: 4
    Last Post: 03-25-2015, 10:46 AM
  2. help with data type criteria
    By abordeau in forum Access
    Replies: 1
    Last Post: 02-20-2014, 09:39 AM
  3. Replies: 2
    Last Post: 11-08-2012, 03:49 PM
  4. Criteria based on user input
    By Alsail77 in forum Queries
    Replies: 5
    Last Post: 08-16-2012, 02:19 PM
  5. Criteria issue when using user input and > < ect
    By scotty562 in forum Queries
    Replies: 3
    Last Post: 11-11-2010, 11:08 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