Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    beaurou is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    16
    Thanks you



    it Work fine,

    I try to change m_intDrawntype as String but it give me runtime error 94 Invalid use of Null, so I when back to m_intDrawntype as variant

  2. #17
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,746
    Post a copy of your database so that readers can see the bigger picture.
    Remove anything private/confidential.
    Do a compact and repair , then zip.

  3. #18
    beaurou is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    16
    This is the Database

    Main form is Form1
    Attached Files Attached Files

  4. #19
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    You are opening the form form2 then running the code you're running so form 2 will ALWAYS open.

    You need to perform this check on FORM1 *before* you open any other forms, then based on the retrieved value open the appropriate form.

    on your form FORM1 remove the embedded macro from your button and use

    Code:
    If IsNull(DLookup("[Drawing_Type]", "[FileA MAPPS]", "[Signal_ID] = '" & Forms!form1!Text4 & "'")) Then    
        DoCmd.OpenForm "form2"
    Else
        DoCmd.OpenForm "form3"
    End If
    instead.

    Also remove the form opening commands from FORM2 or you will continue to see form3 opened as well.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. run time error-3061 too few parameters.
    By pervej.fac in forum Queries
    Replies: 1
    Last Post: 01-04-2014, 05:32 AM
  2. VBA Code Returning Error Run Time Error 3061
    By tgwacker in forum Access
    Replies: 2
    Last Post: 11-24-2013, 11:00 AM
  3. Run-Time Error 3061
    By GraeagleBill in forum Programming
    Replies: 2
    Last Post: 09-23-2013, 06:46 AM
  4. Run-time error 3061
    By boywonder in forum Programming
    Replies: 1
    Last Post: 07-20-2011, 06:14 AM
  5. Run-Time error 3061
    By boywonder in forum Programming
    Replies: 12
    Last Post: 05-24-2011, 10:15 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