Results 1 to 2 of 2
  1. #1
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199

    Forms Problem

    Hi I am trying to display a table records on the form with this code:

    Private Sub Form_Load()


    Dim rs As DAO.Recordset
    Dim str As String

    On Error GoTo Err_cmd_vimport_Click
    'defining the form recordset
    Me.Form.RecordSource = "SELECT Payment_Log.Ecard, Payment_Log.Ereference, Payment_Log.[Upload Amount], Payment_Log.[Card Fee], Payment_Log.[Service Tax], Payment_Log.[Total Amount], Payment_Log.Paid FROM Payment_Log WHERE ((Payment_Log.EmailResponse_Date is not Null) AND (Payment_Log.Payment_Mail = False))"
    On Error Resume Next
    With Me.RecordsetClone
    .MoveFirst
    .MoveNext
    Tcount.Caption = .RecordCount
    End With

    Exit_cmd_vimport_Click:
    Exit Sub

    Err_cmd_vimport_Click:
    MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
    Resume Exit_cmd_vimport_Click
    End Sub

    however i could not be able get any results in the form as if the debuging is not showing anr error, Pleas help

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    You wouldn't get an error with

    On Error Resume Next

    this may be of interest:

    http://www.baldyweb.com/RecordCounts.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Beginner thread, 1 problem when using forms
    By c.yyang in forum Access
    Replies: 8
    Last Post: 06-22-2013, 11:26 PM
  2. Problem with forms
    By WilliamCarr in forum Access
    Replies: 1
    Last Post: 01-03-2013, 06:47 AM
  3. Problem With SetValue, but Only On Certain Forms
    By probablyjoel in forum Access
    Replies: 2
    Last Post: 04-02-2012, 08:52 AM
  4. Forms and Subforms Problem
    By desibabu90 in forum Forms
    Replies: 33
    Last Post: 07-19-2011, 10:48 AM
  5. Forms design problem
    By GeorgeD in forum Forms
    Replies: 2
    Last Post: 05-08-2008, 12:28 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