Results 1 to 3 of 3
  1. #1
    leean21 is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    1

    Main Form to NewForm for Input

    hey...hope someone can help. I basically have a main input form where I am inputing some core information...then I have several command buttons of various areas I need to go (only selecting one) to complete information concerning the main input....when the new form opens, several pieces of the core information needs to carry over to the new form, but for some reason my code is not working. I used the same code from an older database where everything is working fine, so I feel like pulling my hair out...this is the code...

    Private Sub Form_Current()
    If NewRecordNeeded = "Yes" Then
    DoCmd.GoToRecord acDataForm, "frm400Area2", acNewRec
    Me![Date of Entry] = Forms![frmMainInput2]![Date of Entry]
    Me![CreatedBy] = Forms![frmMainInput2]![CreatedBy]
    Me![Bill] = Forms![frmMainInput2]![BillNum]
    Me![BUID2] = Forms![frmMainInput2]![BUID]
    Me![AreaCheck] = "400 Area"


    End If
    End Sub

    first the new form does not open for new entry and nothing carries over
    any thoughts

  2. #2
    Join Date
    Nov 2011
    Location
    Hamilton, NZ
    Posts
    18
    debug and check if the condition is satisfied. New Form will open only if the condition NewRecordNeed="Yes".

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,601
    Why is it not working - error message, wrong results, nothing? Step debug. A good tutorial for debugging is available at the below link.
    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. Replies: 6
    Last Post: 07-19-2010, 10:57 AM
  2. Replies: 2
    Last Post: 06-17-2010, 04:15 PM
  3. Replies: 1
    Last Post: 06-14-2010, 02:31 AM
  4. Rookie Messed Up Main Input Form
    By genest11 in forum Forms
    Replies: 2
    Last Post: 01-14-2010, 02:17 PM
  5. Replies: 6
    Last Post: 01-13-2010, 02:41 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