Results 1 to 6 of 6
  1. #1
    J0cs is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    3

    Exclamation Access 2010: Opening a Second Form using First Form data

    Hi guys!

    I'm currently doing an order system. This is the flow of data:

    I first add a new customer, giving him a unique CustomerID and his/her details. Then I press a button named Add Order to open up a form. My problem is on how I could transfer the current CustomerID to the second form. Thanks!

  2. #2
    mlawson6128 is offline Novice
    Windows XP Access 2002
    Join Date
    Mar 2011
    Posts
    5
    I would just add a combo box on the form that uses the customerID from that table.

  3. #3
    J0cs is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    3
    I have that already. But it will be faster if I don't need to choose the right customer anymore, especially if you have more than 50 customers.

  4. #4
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    In your code to open the form, add code similar to this:

    Docmd.Openform "MyFormName"
    Forms!MyFormName!CustomerID = Forms!MyPreviousFormName!CustomerID

    You can also set the defaultvalue in 'MyFormName' and on the CustomerID field to =Forms!MyPreviousFormName!CustomerID.

  5. #5
    J0cs is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    3
    Quote Originally Posted by pkstormy View Post
    In your code to open the form, add code similar to this:

    Docmd.Openform "MyFormName"
    Forms!MyFormName!CustomerID = Forms!MyPreviousFormName!CustomerID

    You can also set the defaultvalue in 'MyFormName' and on the CustomerID field to =Forms!MyPreviousFormName!CustomerID.
    Can you give me more non-VBA tips? Thanks!

  6. #6
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Quote Originally Posted by J0cs View Post
    Can you give me more non-VBA tips? Thanks!
    .....................................
    Quote Originally Posted by pkstormy View Post
    You can also set the defaultvalue in 'MyFormName' and on the CustomerID field to =Forms!MyPreviousFormName!CustomerID.

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

Similar Threads

  1. Replies: 2
    Last Post: 05-11-2011, 09:06 AM
  2. Opening Access 2000 file in Access 2010
    By Jacob in forum Access
    Replies: 10
    Last Post: 02-12-2011, 06:56 AM
  3. Replies: 2
    Last Post: 01-15-2011, 10:56 AM
  4. Problems with data entry form Access 2010
    By OfficeQuestions in forum Access
    Replies: 4
    Last Post: 09-23-2010, 01:42 PM
  5. Replies: 1
    Last Post: 03-15-2009, 04:46 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