Results 1 to 2 of 2
  1. #1
    sefiroths is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2009
    Posts
    4

    DoCmd.GoToRecord,, acNext impossible to pass the record

    I should make a function with a button that clears the fields on the form.
    I wrote this, but it gives me 'a mistake at the first DoCmd.GoToRecord,, acNext
    saying before the records were written by many users at once, and then hypoxic switch to the specified record.
    that can be?


    On Error GoTo Err_Next_Record
    [Forms]![Documenti].SetFocus
    DoCmd.GoToRecord , , acFirst
    Do While (Recordset.AbsolutePosition <= Recordset.RecordCount)
    Debug.Print Recordset.AbsolutePosition & " *** " & Recordset.RecordCount
    CasellaControllo20.value = 0
    CasellaCombinata23.value = Null
    quantita.value = Null
    status.value = Null
    tipo.value = Null
    dwgsize.value = Null
    [Forms]![Documenti].SetFocus

    DoCmd.GoToRecord , , acNext
    Loop



    Exit_Next_Record:
    Exit Sub

    Err_Next_Record:
    MsgBox Err.Description
    Resume Exit_Next_Record

    End Sub

  2. #2
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    Hi,

    I think you need to work with a RecordsetClone of the forms recordset and then use a bookmark. You can look these up in the help function. Don't forget to handle the possibility of an empty recordset through the properties BOF and EOF.

    greetings
    NG

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

Similar Threads

  1. GoToRecord Help
    By rayhawk in forum Access
    Replies: 10
    Last Post: 08-30-2010, 12:44 PM
  2. Impossible to open more database
    By Grooz13 in forum Access
    Replies: 54
    Last Post: 08-06-2010, 05:17 PM
  3. Replies: 3
    Last Post: 08-03-2010, 02:24 PM
  4. GoToRecord Help!!!!!!
    By Kipster1203 in forum Access
    Replies: 8
    Last Post: 06-11-2010, 11:12 AM
  5. Can I pass "sort by" using DoCmd.OpenReport
    By alsoto in forum Reports
    Replies: 3
    Last Post: 04-16-2009, 08:11 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