Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

how to create date and id bow on switchboard

Discussion in 'Information Technology' started by kawickalee@hotmail.com, Jul 28, 2006.

  1. kawickalee@hotmail.com

    kawickalee@hotmail.com
    Expand Collapse
    Guest

    i am trying to create a system for when a person opens the data base all
    they have to do is type in location id and date string and the report will
    pop up. i have created the table, queries, forms and reports and started a
    basic swithboard that opens up when access is activated needing to know were
    to look or to to due this last step and what this is called. thanks for any
    help.
     
  2. Loading...


  3. xRoachx

    xRoachx
    Expand Collapse
    Guest

    Hi -- Below is a Sub I use to populate a form or report based on the user's
    selections. The form has 3 combo boxes and one option group for the user to
    make selections from. I capture the user's selections and use these to filter
    the form or report. The code is launched by a command button. It should get
    you started in the right direction (WARNING: Watch for word wrap!):

    Private Sub cmdLookup_Click()

    Dim strProjectID As String
    Dim strDesignSR As String
    Dim strDeploySR As String
    Dim strServerID As String
    Dim strWhere As String

    'Populate the project name lookup
    '
    If IsNull(cboProjectName) Then
    strProjectID = "Like '*'"
    Else
    strProjectID = "= " & Me.cboProjectName.Value & ""
    End If

    'Populate the design SR lookup
    '
    If IsNull(cboDesignSR) Then
    strDesignSR = "Like '*'"
    Else
    strDesignSR = "='" & Me.cboDesignSR.Value & "'"
    End If

    'Populate the deploy SR
    '
    If IsNull(cboDeploySR) Then
    strDeploySR = "Like '*'"
    Else
    strDeploySR = "='" & Me.cboDeploySR.Value & "'"
    End If

    'Populate the where clause
    '
    strWhere = "lngProjectID " & strProjectID & " AND strDesignSR " &
    strDesignSR


    Debug.Print strWhere

    Select Case fraOptions.Value
    Case 1
    'Open the form with the WHERE clause populated
    '
    DoCmd.OpenForm "frmProjectInformation", acNormal, , strWhere,
    acFormEdit, acWindowNormal

    'Close the lookup form
    '
    DoCmd.Close acForm, "frmProjectServerLookup", acSaveNo
    Case 2
    'Open the report with the WHERE clause populated
    '
    DoCmd.OpenReport "rptProjects", acViewPreview, , strWhere,
    acWindowNormal
    DoCmd.RunCommand acCmdZoom100

    'Close the lookup form
    '
    DoCmd.Close acForm, "frmProjectServerLookup", acSaveNo
    End Select

    End Sub

    "kawickalee@hotmail.com" wrote:

    > i am trying to create a system for when a person opens the data base all
    > they have to do is type in location id and date string and the report will
    > pop up. i have created the table, queries, forms and reports and started a
    > basic swithboard that opens up when access is activated needing to know were
    > to look or to to due this last step and what this is called. thanks for any
    > help.
     
  4. kawickalee@hotmail.com

    kawickalee@hotmail.com
    Expand Collapse
    Guest

    so i take it i will need to use vba to create there is no quick wizard

    "kawickalee@hotmail.com" wrote:

    > i am trying to create a system for when a person opens the data base all
    > they have to do is type in location id and date string and the report will
    > pop up. i have created the table, queries, forms and reports and started a
    > basic swithboard that opens up when access is activated needing to know were
    > to look or to to due this last step and what this is called. thanks for any
    > help.
     

Share This Page