Results 1 to 3 of 3
  1. #1
    rwahdan1978 is offline Advanced Beginner
    Windows 11 Access 2016
    Join Date
    Jun 2024
    Posts
    57

    query not getting data to form

    Hi



    I have a query like this:
    Code:
    SELECT Users.photo, Users.Score
    FROM Users
    WHERE (((Users.UserName)=[Forms]![Main]![name1].[value]));
    if i run the query after opening the main form it will show the correct result. In the form I have the query as the record source and for the photo i put photo and for score i put score but they are empty in the form and nothing is displayed. How to use query as recordset? Can someone show me how or give ne a link to show to use query as recordset?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Which form do you want to use this query with?

    Certainly form Main must be open for this to work.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,569
    Think about it.
    How can you use form data when the form is not open?
    It is what excel would call a circular reference.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Replies: 4
    Last Post: 09-17-2018, 10:15 AM
  2. Replies: 5
    Last Post: 04-09-2017, 06:12 PM
  3. Replies: 1
    Last Post: 06-03-2016, 08:23 PM
  4. Replies: 7
    Last Post: 03-29-2016, 09:11 AM
  5. Replies: 10
    Last Post: 02-12-2014, 08:26 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