Results 1 to 8 of 8
  1. #1
    daniboi is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2017
    Posts
    8

    Open a Form which populates specific data from another form

    Hi Guys,



    I have a pop-up Form (For creating Maintenance Tickets). It contains a button for Creating a Work Order for that ticket.

    I would like that Button to Open the Work Order Form and populate relevant info from the ticket form (such as customer info and ticket description) so i don't have to retype everything.

    Any direction or help would be appreciated. This is my first post so if i did something wrong please let me know.

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You pass filters between forms. formA has a field with a value, formB has a record source that contains that value. Open formB from formA using that value as a filter:
    VBA or macro.

  3. #3
    daniboi is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2017
    Posts
    8
    Click image for larger version. 

Name:	snap.jpg 
Views:	18 
Size:	93.4 KB 
ID:	27562

    Thanks for your quick reply although i am not sure if that would help with what i am trying to visually achieve. Please see the enclosed image with a bit of description to portray what i am trying to achieve...The highlighted fields in #1 Form (Tickets) should be populated when i click on Create Work Order (#2).

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Why wouldn't it work? User enters information on form 1 and the data is displayed thru the record source for form 2. You will have to save the record when they click on the button so that the data will be available for when form 2 is opened.

  5. #5
    daniboi is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2017
    Posts
    8
    Can you kindly direct me to where i can learn about passing filter between forms so i can attempt to apply your suggestion?

  6. #6
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    Have you created code to create the new Work Order before opening the Work Order form?

    If not, you need to do that! Hopefully you have a unique field for WorkOrderNumber.
    On click of the Create button, build SQL statement to add the new record to the Work Orders table, execute it with CurrentDb.Execute, and then open the Work Orders form with the Where argument set to the WorkOrderNumber.

  7. #7
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    In form design, click on the button, find the OnClick property and add either a macro or an event procedure. Which would you prefer to use? Either one will give you the same result altho VBA is more versatile.

  8. #8
    daniboi is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2017
    Posts
    8
    I am like at the bottom-est pit of beginners when it comes to coding...so i apologize for the lack of knowledge and to answer your question no coding has been done so far...that "Create Work Order" button only opens the Work Order Form at the moment...

    came across this (http://www.baldyweb.com/wherecondition.htm), would i be able to use this?

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

Similar Threads

  1. Replies: 1
    Last Post: 07-01-2016, 08:24 AM
  2. Replies: 4
    Last Post: 06-02-2016, 09:03 AM
  3. Replies: 1
    Last Post: 10-10-2013, 01:52 PM
  4. Replies: 1
    Last Post: 05-02-2013, 08:04 AM
  5. Replies: 5
    Last Post: 03-03-2011, 03:56 PM

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