Page 1 of 7 123 ... LastLast
Results 1 to 15 of 93
  1. #1
    Join Date
    May 2007
    Posts
    92

    Unanswered: reservation system

    Can anybody knows how to allow multiple user to access the form in microsoft access??

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by StevenE
    Can anybody knows how to allow multiple user to access the form in microsoft access??
    First off, this is the SQL forum, not the MS Access forum...a mod will be along to move this thread shortly.

    Secondly, let me try to rephrase your question and see if I got it right:

    Quote Originally Posted by SteveE
    Can anybody tell me how to allow multiple users to access the same form in Microsoft Access?
    The answer is at once simple and complex:
    1. [Simple] Put the .mdb file on a network share, multiple users can then access the same file (with it's data and forms) and have access to the updates made by all.

    2. [Complex] Doing so will almost inevitably lead to corruption and loss of data if more than one user attempts to access the file simultaneously. MS Access is useful and easy, but has never been a particularly robust database management system.

    One thing you can try (I did this with a lot of success many years ago) is to separate the data file (.mdb) from the file that contains your forms, reports, queries and code (.mde, I think). By splitting the two you lessen the chances of data corruption considerably while retaining some of the nicer features of Access.

    Regards,

    hmscott
    Have you hugged your backup today?

  3. #3
    Join Date
    May 2007
    Posts
    92

    Reservation System

    Thank hmscott,

    But i still do not know how to transfer the data in the listbox which the user select.. And i want to allow the user to borrow and see their record on borrowing but the administrator can edit everything in the form

    regards,
    tk

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Not sure I fully understand what you mean by borrow the data but in regards to transfering data from a listbox which the user selects....
    On the AfterUpdate event of the listbox (i.e. say it's called: ListItems

    Let's say for this example that you have 4 fields in the listbox. The column Count property = 4 and the ColumnWidths = 0";2";1";1" (remember that you need to have the right # of columns and the right # of widths.

    Private Sub ListItems_AfterUpdate()
    Forms!MyOtherForm!MyFieldName1 = me!ListItems 'Grabs the value in the first column on the row the user selected
    Forms!MyOtherForm!MyFieldName2 = me.ListItems.column(1) 'Grabs the 2nd column value for the row the user selected
    Forms!MyOtherForm!MyFieldName3 = me.ListItems.column(2) 'Grabs the 3rd column value for the row the user selected
    Forms!MyOtherForm!MyFieldName4 = me.ListItems.column(3) 'Grabs the 4th column value for the row the user selected
    End Sub

    I don't quite understand what you mean by allowing the user to borrow and see their record on borrowing but the administrator can edit everything in the form. If you're talking about a security type setup, you probably want to set up a security table (i.e. LoginID, SecurityLevel) and then design a lookup on this table or a function which grabs what securityLevel that LoginID has. (see Get User Permissons post in the code bank). It utilizes a function called isAdmin which returns true if the user LoginID is in the table (i.e. Admin) and false if the LoginID is not in the table (no SecurityLevel field), they are either in the AdminTable or not. You would then do something like:

    If isadmin() = true then Forms!MyFormName.AllowEdits = true else Forms!MyFormName.AllowEdits = false. You can do this on the on open event of the form. Take a look at how the isadmin function is created in the module. You can make one like it to test and see if the user is "borrowing" their record. There's also a very nice GetUser function which returns the users Windows LoginID. If the loginID is stored in one of the columns in the listItem listbox shown above (ie. You've stored the LoginID with the record), then it's a matter of just testing to see if it's that user's record.

    if me.ListItems.column(3) = getuser() then
    .....
    code to do something as it matches
    ....
    end if

    Or you can test it if it's a field on the form....if Forms!MyFormName!Borrower = getuser() then Forms!MyFormName.allowedits = true else Forms!MyFormName.allowedits = false. You'd probably want to add this test in the form's OnCurrent event OR right after the command which opens this form which is on the other form with the command (which might work better).

    You can use the Getuser() routine to set it as a default value of the field which will hold who's record it belongs to on the form where the record is being created (i.e. DefaultValue = getuser().)

    But download and look at the getuserPermissionsExample in the code bank. It's got some good techniques you might be able to utilize. Remember to import all the modules into your mdb.
    Last edited by pkstormy; 06-03-07 at 04:52.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    May 2007
    Posts
    92

    Reservation System

    Thank Paul Kohn,

    Basically, my supervisor wanted me to create a tool reservation system using microsoft access. Because now, my company has create a room/resource reservation system in the lotus note in the company. And when people login their id, they can be identified who the user which is what my supervisor wants me to do. The Reservation System must have 3 basic things. First is the New Reservation (where the user can book the tool and see the availability of the tool in term of date and time). Second, the user can cancel it reservation. Thirdly, the user can able to see the whole tool status (in term of availability). Eg. is the tool needs calibration or reserved by someone

    The tools are divide into shared equipment and individual equipment. The user can only borrow the shared equipment.

    As for the Adminstrator, he will take charge of the maintenace of the booking tools system that i have created. He is able to change everything in the system which the users can't. The user only can check its own booking record and see the availability of the tool etc..

  6. #6
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    In regards to getting who logged in, see the post in the DBForums Data Bank, GetUserandPermission example. It has a nice example to do this. There are also several other posts on getting who logged in.

    You also might want to check out the Calendar example which you will probably need to utilize.

    There also might be some good examples of a Reservation type system others have uploaded somewhere in this forum. When I had to create one, I remember the biggest thing was for users to see the records which had the different rooms reserved and could easily add a new room/reservation. I started with a basic table like this:

    ReserveID (autonumber)
    ReserveRoom (Room that's reserved)
    Building (building room is reserved in)
    LoginID (Who reserved the room/Main Contact)
    ReserveDate (Date room is reserved)
    ReserveStartTime (Starting time)
    ReserveEndTime (Ending time)
    ReserveNotes (Notes on reserving the room)
    RoomStatus (ie cancelled, ready, or reserved)
    EmailSent (Yes/No on if an email was sent to others)
    RoomLayout (text or graphic picture on how the room is to be configured)
    NeedCondiments (Yes/No on whether the attendees will need condiments)
    NumberAttending (approximate number of people attending)
    CallNumber (conference calling number)
    CallPassword (password for calling number)
    EquipmentNeeded (type of equipment needed, ie projector, blackboard)
    DateEntered (when the record was created)
    CreatedBy (who made the reservation)
    LastUpdated (Date the record was last updated)
    UpdatedBy (who last updated the record)
    Last edited by pkstormy; 06-03-07 at 13:52.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  7. #7
    Join Date
    May 2007
    Posts
    92

    Reservation System

    By the way, can u send me a sample reservation system using access.. And where can i find the sample reservation system?

  8. #8
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quote Originally Posted by StevenE
    By the way, can u send me a sample reservation system using access..
    Nobody is doing the work for you Steven.
    I think Paul has provided more than enough help for you so far to go away and give it a go yourself!

    Until I see that you have actually made an effort yourself, personally I am unwilling to step in and give you any further help.
    George
    Home | Blog

  9. #9
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Sorry StevenE but I agree with Georgev. I have to draw the line at posting a full application. There are many samples you can download though if you do a search on google.

    Give it a try yourself. "Get your feet wet." We'll be here to help you if you encounter a problem - just post your code and the problem you're having.

    If you're having troubles getting started, there are a lot of nice wizards in MSAccess to help...
    1. Create your table. (you can use the Table wizard if you like)
    2. Create a form using the form wizard.
    3. Create a report using the report wizard.
    4. Create a menu system using the Switchboard Manager.
    Last edited by pkstormy; 06-10-07 at 13:30.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  10. #10
    Join Date
    May 2007
    Posts
    92
    Hi Paul,

    What is your email? I have done the reservation form. I want ask u some question after u look at my form.

  11. #11
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    This is a public forum - please keep your questions here.
    You can upload attachments with your posts, such as your db (if you zip the file).
    Why not post that and ask your questions at the same time?
    George
    Home | Blog

  12. #12
    Join Date
    May 2007
    Posts
    92
    Tk Tool Reservation2.zip

    There is a problem I wanted to ask the search form.
    How to make the reserve button enabled = true when the user select the status of the tool is available.

    And when the user go to the search , the reserve button will automatically become enabled beside the available textbox.
    Last edited by StevenE; 06-11-07 at 05:45.

  13. #13
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I noticed 2 small errors when I was playing with the search form
    You confused AND and OR (you were removing one character too many!)
    And the strWhere needed some tweaking. Remember that you need to use single quote for string comparisons!
    Code:
     If Not IsNull(Me.cbostatus) Then
            strWhere = strWhere & "([Status of The Tool] = '" & Me.cbostatus & "') OR "
        End If
     
        '**********************************************************************
        'Chop off the trailing " AND ", and use the string as the form's Filter.
        '***********************************************************************
        'See if the string has more than 5 characters (a trailng " AND ") to remove.
        lngLen = Len(strWhere) - 4
        If lngLen <= 0 Then     'Nah: there was nothing in the string.
      
            MsgBox "No criteria", vbInformation, "Nothing to do."
            
        Else                    'Yep: there is something there, so remove the " AND " at the end. Should be " OR " 
            strWhere = Left$(strWhere, lngLen)
            'For debugging, remove the leading quote on the next line. Prints to Immediate Window (Ctrl+G).
            Debug.Print strWhere
            
            'Finally, apply the string as the form's Filter.
            Me.Filter = strWhere
            Me.FilterOn = True
        End If
    George
    Home | Blog

  14. #14
    Join Date
    May 2007
    Posts
    92

    Reservation

    that another problem is that the reserve button that i put beside the status of the tool is not enable = true when the status is available. After that , the reserve button enable is true, when the user press the reserve button, i want it to link to the reservation form. In the reservation table i can manage to capture the description of the tool.

  15. #15
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Something like this should suffice
    Code:
    If Me.cbostatus = "available" Then
        Me.cmdOpenform.Enabled = True
    Else
        Me.cmdOpenform.Enabled = False
    End If
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •