Results 1 to 3 of 3
  1. #1
    crimedog is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    141

    Code for form works on desktop but not on Network Drive

    I have a form - that uses a combobox to open form number 2 @ a specific record. It works great on my C: drive - but when I copy it onto the Network Drive it just goes to the first record every time (unless it is 0 - then it open new record like it is supposed to:
    Code:
    Dim VarID As Integer
    VarID = Me.Combo18
    If VarID = 0 Then
        DoCmd.OpenForm "00_360_Request_360", , , , , acHidden
        DoCmd.GoToRecord acDataForm, "00_360_Request_360", acNewRec
        DoCmd.OpenForm "00_360_Request_360", , , , , acDialog
    ElseIf VarID > 0 Then
        DoCmd.OpenForm "00_360_Request_360", , , , , acHidden
        DoCmd.FindRecord VarID, , True, , True
        DoCmd.OpenForm "00_360_Request_360", , , , , acDialog
        
    End If
    DoCmd.Close acForm, Me.Name
    I do not know what is wrong. Also the first time I copied te front end over - you had to click twice on the Command button. The second time I copied it - it worked...

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    You dont do it this way...(not open form, find, openform)

    you open the form once, to the exact record
    DoCmd.OpenForm "00_360_Request_360",,,"[varid]= " & combo18

  3. #3
    crimedog is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    141
    That fixed it

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

Similar Threads

  1. Accessing MDB on network drive
    By thecsmith70 in forum Access
    Replies: 6
    Last Post: 02-19-2015, 03:21 PM
  2. Max users on a network drive
    By data808 in forum Access
    Replies: 2
    Last Post: 10-23-2014, 02:12 AM
  3. Replies: 1
    Last Post: 03-13-2014, 10:11 AM
  4. Error message when mapping network drive
    By dwcolt in forum Programming
    Replies: 5
    Last Post: 05-11-2011, 08:56 AM
  5. Replies: 1
    Last Post: 04-11-2011, 12:34 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