Results 1 to 4 of 4
  1. #1
    eliotchs is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2011
    Posts
    24

    ?? on Opening a different form if no data exists on theoriginal one

    Hi

    Hopefully I'll explain this correctly...

    I have a button on a form which opens a pop up form called episodenotes.
    Episodenotes runs a query based the ID on the main form and displays the notes for that ID

    If that ID does not have any notes or the query it runs = 0 I want to open a different form which will add notes..



    Please let me know if this needs any clearification...

    Thanks

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Episodenotes runs a query based the ID
    Can you show the code that does this?

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    One form can probably serve both purposes.

    If IsNull(DLookup("ID", "EpisodeNotes", "ID=" & Me.ID)) Then
    DoCmd.OpenForm "EpisodeNotes", , , , acFormAdd, Me.ID
    Else
    DoCmd.OpenForm "EpisodeNotes", , , "ID=" & Me.ID
    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.

  4. #4
    eliotchs is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2011
    Posts
    24
    Thanks you..

    Since I don't know bettter ... lol and the add form is a bit different..

    I used

    If IsNull(DLookup("clino", "Episode", "ClINO = '" & strClientID & "'")) Then
    DoCmd.OpenForm "EpisodeADD"
    Else
    DoCmd.OpenForm "EpisodeNotes"
    End If

    Thanks Again..

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

Similar Threads

  1. Access not passing data when opening form
    By cardgage in forum Forms
    Replies: 5
    Last Post: 12-11-2012, 06:34 AM
  2. Opening a form from another with pre-populated data
    By uaguy3005 in forum Programming
    Replies: 4
    Last Post: 07-09-2012, 06:05 AM
  3. Replies: 5
    Last Post: 03-11-2011, 10:29 PM
  4. Form - Filter on load (if data exists)
    By dilbert in forum Forms
    Replies: 0
    Last Post: 08-13-2010, 11:39 AM
  5. Replies: 1
    Last Post: 03-15-2009, 04:46 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