Results 1 to 4 of 4
  1. #1
    MFS is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235

    Open form based on query information

    Hello all,
    Okay, lets see if I can explain this with as little confusion as possible . . .
    I wrote a query that is asking for you to enter the ID number of the table information you wish to review. So when the query starts It will ask "Enter ID Number" I would then like the database to goto that form that was designed showing all the information related to the ID number entered.


    (Open Work Orders form)

    If the task has already been completed, based on a check box related to the ID number, being false then I would like a form that opens and says "The task has already been completed, would you still like to review or return to main form?" With a "Yes" or "Return to main" command button.

    Can someone help?

    Mike

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Will try to answer with as little confusion as possible.

    Is the query with the prompt also the RecordSource for the form? This would be the only way to 'pass' the criteria to the form, the form has that query as its recordsource. Open the form, the prompt will popup, and the entered criteria is part of the form's RecordSource.

    Then second question of your post requires code to accomplish.
    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
    MFS is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    "Is the query with the prompt also the RecordSource for the form?"

    Yes it is, and I could get it to work but was looking for something that would tell the user that . . . "Work Order Number ?? has already been closed, would you still like to open form and review data ?" "Yes" "No"

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Then you need to write code. I use only VBA, don't know if macros can do this.

    User enters criteria into textbox on form. Code checks for status, if closed issues a MsgBox prompt. Response to the MsgBox is processed by code. Otherwise, just open the form to the requested record and let user face possibility it is closed. You could have a textbox on the form that indicates the status and with conditional formatting it could be displayed with alternate color if closed.

    I don't use query parameter prompts. Too hard to validate input and can't reference the response in code.
    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.

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

Similar Threads

  1. Button to open form with relative information...
    By darkyetlovely39 in forum Forms
    Replies: 28
    Last Post: 05-23-2011, 11:37 AM
  2. Subform Filter based on Main Form Information
    By james.carpenter2 in forum Forms
    Replies: 0
    Last Post: 02-16-2011, 09:55 PM
  3. Cancel opening a form based on information
    By eww in forum Programming
    Replies: 1
    Last Post: 10-19-2010, 01:24 PM
  4. Open Form with information from previous form
    By jheintz57 in forum Forms
    Replies: 9
    Last Post: 03-23-2010, 07:30 AM
  5. Open form based on query results
    By RobbertH in forum Queries
    Replies: 1
    Last Post: 02-10-2010, 08:13 AM

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