Results 1 to 7 of 7
  1. #1
    Cheryl R is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Posts
    36

    Open form to first query result

    I am sure there is a simple answer but I can't find it anywhere...



    I have a simple select query that tells me which tool we need to work on next.
    I have a button that opens the work order form. I want the button to open the form to the first tagNo on the query.

    An important thing to know is that this process will be used by several different technicians, quite possibly at the same time (each user will have a front-end copy on their desktop of course). How do I make the form always open to the next tag in line but never open the same tag number to different technicians?

    Do I need to create a recordset for this to happen or is it simply a Where Condition on form open?

    Thank you!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I don't know what you mean by 'first tagNo' and 'next tag in line'. Is tagNo a unique identifier? You want this identifier to be generated by code? Custom unique identifier is a common topic in forum. Review https://www.accessforums.net/forms/a...ing-23329.html
    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
    Cheryl R is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Posts
    36
    Sorry, don't mean to be vague...

    In my DB, TagNo refers to the tool we will work on. (We are a tool repair shop and one order can have several tools on it.)
    The tool gets a TagNo when it is checked in so yes, TagNo is the unique identifier for the tool.

    I want to be able to program the button so that when the technician clicks on the "Repair next tool" button, it immediately opens to the next tool to be repaired.
    The next tech can click the button at the same time and it gives him the next one and so on...

    Hope that makes a little better sense.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Still don't understand what 'next tool' would be. Is this a new number that needs to be generated? Or do you want to move to another existing record?
    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
    Cheryl R is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Posts
    36
    There is currently a query that lists the tools by priority level and oldest date in.
    Not a new number, but a sort order for the tools on that queried list.
    I simply want it to open the form to the first record in that query.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    If the form is bound to that query or if it is included in the form's RecordSource by joining, it should open to the first record established by query sort order.
    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
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    If I understand your process correctly, generally speaking, you're going to need to add a Yes/No Field, call it 'Assigned,' and when a tech calls up the next tool in line, have that Field for that Record set to 'yes.' Then, when calling up the next tool in line, only return the earliest Record where Assigned = No. That way, an repair already assigned won't be included when searching for the next tool to repair.

    Linq ;0)>

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

Similar Threads

  1. Replies: 3
    Last Post: 04-30-2013, 12:01 AM
  2. Replies: 2
    Last Post: 02-13-2013, 04:14 PM
  3. Adding "Open" column to Query Result
    By premis in forum Queries
    Replies: 12
    Last Post: 05-30-2012, 03:47 PM
  4. Open report from query result
    By shank in forum Programming
    Replies: 11
    Last Post: 10-04-2011, 12:59 PM
  5. Use query result to open form.
    By Playerpawn in forum Access
    Replies: 3
    Last Post: 05-12-2011, 11:18 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