Welcome to SPN

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

Sign Up Now!
  1. Monthly (Recurring) Target: $300 :: Achieved: $95
      Become a Supporter    ::   Make a Contribution   

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.
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page