Results 1 to 6 of 6
  1. #1
    anthony@aahs.us is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2018
    Posts
    14

    pass content of textbox frpm one form to another


    I havve a form with a textbox that contains the record ID of a table and I want to pass that id to another textbox in another form to allow me to pull that record

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    DoCmd.OpenForm "another form name", , , "ID=" & Me.textboxname
    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
    anthony@aahs.us is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2018
    Posts
    14
    I've used the following in an event on a button. DoCmd.OpenForm "frm-customer / service call", , ,"CustID=" & Me.Customer_ID
    custid
    is the name of an unbound textbox within the form
    "frm-customer / service call" that I use to pull up the record


    Customer_ID
    is the name of the textbox I am getting the data from (by using a breakpoint I am able to confirm that the data is in the me.customer ID when I push the button I get an "Enter Parameter Value " under which custid is displayed and a textbox to enter a response and of course a OK or Cancel button

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Is the form based on a query with a dynamic parameter? Is CustID a field in "frm-customer / service call"?

    Advise no spaces nor punctuation/special characters (underscore only exception) in naming convention.
    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
    anthony@aahs.us is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2018
    Posts
    14
    The
    form
    "frm-customer / service call"
    Record source is a table called "tbl-Customer" in the form is an unbound text box named "CustID" if you key in a numeric value on key down the customer record is pulled up.

    I Have a second form "frm-Service Due" it contains a field "Customer ID" I want to use the data in that field to be copied to the unbound text box named "CustID" in the form
    "frm-customer / service call"
    so when I key down the customer record is pilled up in

    the form
    "frm-customer / service call"

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Don't use KeyDown event, use AfterUpdate. Why not use combobox instead of textbox for user input of filter criteria?

    Why don't you use form/subform arrangement?

    Why would you copy value to an unbound textbox?

    I don't understand your db structure and form design.

    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.

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

Similar Threads

  1. Pass textbox object into form
    By jaryszek in forum Modules
    Replies: 5
    Last Post: 11-02-2017, 05:47 AM
  2. Export textbox content as TXT (notepad) file
    By radian89 in forum Access
    Replies: 6
    Last Post: 01-25-2016, 09:39 AM
  3. Replies: 1
    Last Post: 03-11-2015, 03:38 PM
  4. TextBox Content
    By myuser in forum Programming
    Replies: 1
    Last Post: 05-16-2012, 03:07 AM
  5. Replies: 5
    Last Post: 04-19-2012, 09:35 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