how to create a switchboard in ms access?

Discussion in 'OT Technology' started by speedlife, Apr 30, 2003.

  1. speedlife

    speedlife Guest

    i went to tools then add ins and the switchboard manager is not there.
    anyone know how i can create one?
     
  2. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Install the wizard that will allow you - it's an add-on for MSAccess just needs installing
     
  3. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Oh and if you're wondering - it used to be under Add-Ins - now it's under database utils.
     
  4. speedlife

    speedlife Guest

    how do i write an expression so when a query comes up
    itll ask for a date range and then give me that date range i enter?
     
  5. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Let's say it was a field called InvoiceDate, in the query you would select the field InvoiceDate and as the criteria for that field you would enter in Between [StartDate] and [EndDate]. Access will automatically ask you for those two dates since it doesn't refer to any fields in the select statement (assuming you didn't have field names identical to those). In addition, you can also select the properties of the query and select parameters to ensure the right data type is entered. Just enter StartDate for the name and the data type would be Date/Time. Do the same for enddate
     
  6. speedlife

    speedlife Guest

    if i do the date range statement, and then add to search for a particular position, will it go by the date range first and then by the second part?

    example, enter start date, enter end date, enter position title.
    i want it basically to go by these criterias. is this as easy as doing the inbetween statement and then say enter [position].

    As for the position part, is there a way so that a dropdown comes up rather than having the user enter in the position and possibly spelling it incorrectly.
     
  7. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Yes, you need to start using forms - what I said is a good dirty way to get results but it's not supposed to be used in production.

    Just make yourself a blank form based on no table or query. Create two control boxes and name them StartDate and EndDate. You can now use the input mask if you would like on each of these boxes to limit how they enter the data - at the very least, change the format to general date.

    For the position, you have two options. One you can go ahead and type all the positions into the row source, or you can have a table full of positions. I prefer the latter as it's more useful in other areas. You can then create a combo box on the form based on that new table, labeled Position. Once you have your form ready to be used as a selection criteria, you need to add a button that will run the query. Add a button, select open query, select your query and then label it. Save the form as SelectInvoice or something (don't use spaces - ever - you can but it's a pain in the ass and isn't transferable into other database formats)

    Change your query to reference these values. Under the invoice date change the criteria to:

    between forms!SelectInvoice!StartDate and forms!SelectInvoice!EndDate

    Under the position criteria:

    forms!SelectCriteria!Position

    You may want to reference positions by an ID number rather than the full name - it will allow you to change the name later on without having to change data. When you create the Positions table, you will be asked if you want to create an index, if you say yes it will create an autonumber field called ID. Rename that to PositionID. You will have to decide whether or not you want to refer to the position as the name or the ID, but make sure you don't waver from the table with the information, to the query, to the combo box referred to above.
     

Share This Page