Results 1 to 6 of 6
  1. #1
    adams.bria is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2010
    Posts
    22

    Multiple Forms carrying forward data

    Here is what I would like to do. I have a "client center" where you bring up the demo data on a client. On frm_cli_center, I have buttons to open 4 different forms. When a button is clicked, I would like it to open the form, carrying forward the empl_id of the current record on the client center. If that empl_id already exists, I want it to open with the data that was already entered. Any help?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    What you want requires code. I use only VBA (no macros). However, never actually had to code something like this.

    The code would have to check if record exists and if not, open form (or move) to new record. The trick is figuring how and in what event to check for the existing record.

    Did you consider form/subform arrangement instead?

    Do you want to provide project for analysis?
    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
    adams.bria is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2010
    Posts
    22
    Quote Originally Posted by June7 View Post
    What you want requires code. I use only VBA (no macros). However, never actually had to code something like this.

    The code would have to check if record exists and if not, open form (or move) to new record. The trick is figuring how and in what event to check for the existing record.

    Did you consider form/subform arrangement instead?

    Do you want to provide project for analysis?
    So it won't let me upload because it is larger than 500 kb? I have deleted everything except the neccessaities and it is still 1.5mb

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Zip it with Windows Compression. Up to 2mb zip allowed.
    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
    adams.bria is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2010
    Posts
    22

    DB

    Quote Originally Posted by June7 View Post
    Zip it with Windows Compression. Up to 2mb zip allowed.
    Here it is.


    dbd.zip

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Description in your post doesn't quite match the db. No form named frm_cli_center, I find frmClient_Center and it has only 3 buttons, not 4.

    This would be so simple if you used form/subform arrangement. No code. The forms you want to open could each be placed on a page of a tab control.

    Code to check if client in Consent table and open form to existing or new record something like:

    If Not IsNull(DLookup("ClientID", "tbl_Consent", "Client_ID='" & Me!Client_ID & "'")) Then
    DoCmd.OpenForm "frm_consent", acNormal, , "Client_ID='" & Me!Client_ID & "'")
    Else
    DoCmd.OpenForm "frm_consent", acNormal, , , acFormAdd
    End If
    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. Help with carrying over values
    By htjr in forum Access
    Replies: 4
    Last Post: 02-18-2012, 01:44 PM
  2. Carrying data throughout Navigation Forms
    By drrob1983 in forum Forms
    Replies: 2
    Last Post: 09-06-2011, 12:57 AM
  3. Carrying over sort to report
    By eww in forum Programming
    Replies: 2
    Last Post: 03-04-2011, 03:39 PM
  4. Replies: 0
    Last Post: 01-03-2011, 03:38 PM
  5. Bringing forward a data in a form
    By cwwaicw311 in forum Forms
    Replies: 9
    Last Post: 02-24-2010, 07:58 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