Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    patatrac is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    9

    report random query

    ciao for all
    i have a query random:

    id questions answers
    1 xxxx ccccc


    2 qqqq vvvvv
    3 zzzz fddfdd
    4 xxxq fsffsfsf
    5 qqqqs gfgggfgfgf

    and 2 reports limit 3:
    reports questions ( ok with random questions)
    reports answer ( my problem where i would visualize the random id+answer displayed of first report). I search in all way but unfortunately without solutions...
    thank for help me
    example:
    in my first report is display

    id questions
    2 qqqq
    4 xxxq
    5 qqqqs

    i would in the second report solution with answer

    id answer
    2 vvvvv
    4 fsffsfsf
    5 gfgggfgfgf

    my problem is the random

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You want query to retrieve a random set of records?

    Bing: access query random records

    http://www.techrepublic.com/blog/how...rosoft-access/
    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.

  3. #3
    patatrac is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    9

    random

    Click image for larger version. 

Name:	Cattura.PNG 
Views:	8 
Size:	43.2 KB 
ID:	21100the question is simply
    you look Report1 and Report2 have recordsource Report_print

    Report1 have id 35 37 38 51 52
    Report2 have id 35 38 39 52 53
    how is possible have:

    Report1 have id 35 37 38 51 52
    Report2 have id 35 37 38 51 52

    first open Report1 and after Report2 and have equal id

    I serch way to clone the display Report1data in a table eg TblClone , and after build the query for Report2
    with relation Tblclone ID_Questions = TblMainQuestions ID_Questions
    i think this is the way but I dont think how made it

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I don't understand.
    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.

  5. #5
    patatrac is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    9
    my question is :
    query random every open Report1 change my IDs (and this is ok , is random...)
    I would that with open Report1 netx step open Report2 and compare in Repor2 equal IDs of Report1

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Well, if the query is random then the two reports will not retrieve exactly the same records. That's the nature of 'random'.

    Why would you need to compare reports?
    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.

  7. #7
    patatrac is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    9
    Report1 are questions Report2 are Answers

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    These are the correct answers for each question or they are respondents' answers?

    Regardless, do a query that joins questions and answers then pull random records from that query.
    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.

  9. #9
    patatrac is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    9

    random

    test.zip
    Thanks for answer but i don't understod very well...
    i add file
    shift button press on open file,

    Report_Print the query that is command with random Variabili query
    Report1
    Report2 (my problem..)

    I would open Report1 (questions) and after with Report1 open.... open Report2(answer) with equal id
    My solution is
    On open event Report1 save in a table IDs , on close delete IDs
    but i don't able release it

  10. #10
    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,726
    Readers do NOT understand your post.
    Show us an example -- starting values and what you want as final values.

    You can use your native language, then Google translate to get English.





    I lettori non capiscono il tuo post.
    Mostraci un esempio - i valori di partenza e quello che vuoi come valore finale.

    Č possibile utilizzare la vostra lingua madre, poi Google translate per ottenere l'inglese.




  11. #11
    patatrac is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    9

    random

    test2.zip
    Open Report1
    report1 have On event open
    1 generate a table Answer
    2 add id (is this my problem...I would that when I open Report1 in my table Answer INSERT all my display IDs noT only one)

    on event close
    1 delete table Answer

  12. #12
    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,726

  13. #13
    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,726
    Not any clearer to me.

    When you post the same question on multiple forums, please tell users you have done so.

    Assuming Italian:
    Quando si registra la stessa domanda in diversi forum, informi gli utenti che avete fatto cosė.

  14. #14
    patatrac is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    9
    ok the question is in a multiple forum ..sorry , is no important the error when open the database ,
    I would save in the table Answer all the id diplayed to Report1 (when open)

  15. #15
    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,726
    Readers do NOT understand what you are trying to do nor what your descriptions mean.

    You have been given answers in different forums and have not commented on these, specifically.
    ??????
    I would save in the table Answer all the id diplayed to Report1 (when open)

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 05-29-2015, 11:16 AM
  2. Update Query - Random Alphanumeric String
    By turkeylord in forum Queries
    Replies: 3
    Last Post: 09-12-2014, 12:55 PM
  3. Random Query
    By TrackStar in forum Queries
    Replies: 0
    Last Post: 06-20-2012, 09:10 AM
  4. Replies: 8
    Last Post: 03-19-2012, 08:50 PM
  5. Query Random Number Column Manipulation
    By gmontano in forum Queries
    Replies: 4
    Last Post: 10-05-2010, 01:36 PM

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