Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 46
  1. #16
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,445
    I am suggesting that according the MS documentation, the macroerror does not work in VBA - I'm suggesting you should be testing whether or not it does work.

    In vba I would expect you to use



    if err.number<>0....

  2. #17
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Good morning. Just change your code so it looks like this.
    Code:
    '------------------------------------------------------------
    ' Command50_Click
    '
    '------------------------------------------------------------
    Private Sub Command50_Click()
       On Error GoTo Command50_Click_Err
    
       'On Error Resume Next'
       DoCmd.GoToRecord , "", acNewRec
       DoCmd.GoToControl "partnumber"
    '   If (MacroError <> 0) Then
    '   Beep
    '   MsgBox MacroError.Description, vbOKOnly, ""
    '   End If
    Command50_Click_Exit:
       Exit Sub
    
    Command50_Click_Err:
       MsgBox Error$
       Resume Command50_Click_Exit
    
    End Sub

  3. #18
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    I have just tried this - no change. I still get the warning message etc......

  4. #19
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Now add : MsgBox "Dirty = " & Me.Dirty
    ...before the 1st DoCmd.

  5. #20
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    Done that and I now get a warning message which says
    Dirty = False
    and then initial run time error message appears......

  6. #21
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Making progress. We've eliminated a Dirty record being a problem. remove that line now. I think it has something to do with going to a new record and your table specifications. Comment out the
    DoCmd.GoToControl "partnumber"

    line.

  7. #22
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    Done that
    Dirty = False message has now gone but the intial run time error is still there....

  8. #23
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Any chance you could post your db? If so then Compact and Repair first and zip it up.

  9. #24
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    Unfortunatley, I can'tsend the whole dataase because there is some "sensitive" information contained on it.
    Is there any way I could just send you the bits you need ........?
    If so, does it make any difference that the form is in the Front end and the tables which support are in a Back end ?

  10. #25
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Well, I would need the form and its RecordSource tables. Is that possible?

  11. #26
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I should admit I rarely use the DoCmd function. I usually use a DAO.Recordset. Are you using DAO or ADO?

  12. #27
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    Sorry, I don't understand the question....

  13. #28
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    See if this throws an error:
    Code:
    '------------------------------------------------------------
    ' Command50_Click
    '
    '------------------------------------------------------------
    Private Sub Command50_Click()
       On Error GoTo Command50_Click_Err
    
       Me.Recordset.AddNew
       
    '   DoCmd.GoToRecord , , acNewRec
    '   DoCmd.GoToControl "partnumber"
       
    Command50_Click_Exit:
       Exit Sub
    
    Command50_Click_Err:
       MsgBox Err.Number & " - " & Err.Description
       Resume Command50_Click_Exit
    
    End Sub

  14. #29
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    I have imported most of the tables you need and the forms you need into a seperate database.
    The size of the current file is 7.87 MB.
    As I have never sent anything like this before, can you tell me how to zip the file and then how to attach the zipped file.
    Once I do that I can send it to you......

  15. #30
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    Ends up with the same error................

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

Similar Threads

  1. DLookUp Flashing Error
    By RawToast in forum Access
    Replies: 1
    Last Post: 12-16-2014, 09:02 AM
  2. Main page Form flashing button
    By benh in forum Forms
    Replies: 2
    Last Post: 09-19-2014, 05:17 PM
  3. Replies: 6
    Last Post: 12-30-2011, 01:07 PM
  4. Flashing textbox
    By coach32 in forum Forms
    Replies: 1
    Last Post: 11-22-2011, 02:22 AM
  5. subclassing a form to control flashing
    By swt1951swt in forum Forms
    Replies: 0
    Last Post: 07-14-2009, 05:23 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