Results 1 to 2 of 2
  1. #1
    BorisGomel is offline Competent Performer
    Windows Vista Access 2003
    Join Date
    Apr 2011
    Posts
    101

    Open a form based on date off another form

    Hello everybody,
    I am trying to open form Cap Nan Form based on date in text box off another form Upload Form and got no result. Second form ( Cap Nan Form) is opened but no shows no record.
    The code vb I use the below:
    Private Sub OpenForm_Click()
    On Error GoTo Err_OpenForm_Click
    Dim DocName As String
    Dim Criteria As String
    DocName = "Cap Nan Form"
    Criteria = "[Date of Report]=" & "'" & Me![txtDate] & "'"


    DoCmd.OpenForm DocName, , , Criteria
    Exit_OpenForm_Click:
    Exit Sub
    Err_OpenForm_Click:
    MSGBOX Err.Description
    Resume Exit_OpenForm_Click
    End Sub

    Thnak you in advance for help,

    The Best Regards,



    BorisGomel

  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,652
    See if this helps:

    BaldyWeb wherecondition

    Note the date delimiter.
    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. Replies: 3
    Last Post: 08-18-2012, 03:21 PM
  2. Open form based on subform - possible
    By Richie27 in forum Access
    Replies: 2
    Last Post: 06-19-2012, 12:52 PM
  3. open form based on combobox
    By bigmac in forum Forms
    Replies: 3
    Last Post: 04-09-2012, 11:25 AM
  4. open form based on comboboxes
    By bigmac in forum Forms
    Replies: 1
    Last Post: 04-04-2012, 06:55 AM
  5. Open form based on value from previous form
    By MiddletoM in forum Access
    Replies: 1
    Last Post: 04-24-2011, 07:01 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