Results 1 to 11 of 11
  1. #1
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276

    Can Someone Help Me Fix My DB!!!

    I am trying to fix the problems in my database, have searched on this site and many others but could not figure out the solutions.



    So therefore am asking for anyone who can help me fix the following problems in the DB attached.

    I am having problems on the supervise form of the DB.

    1. If Possible Login ID Combo Should Be a text Box, and it should After update the "Login User ID" from "Last Login Querry" in The "PettyEntryLoginBy" In Petty Cash Table. This should be done upon selecting supervise or Problem Entry Combo's. So I know Which User supervised it
    2. All Records Are Editable. Where as I only want "Supervise" & "Problem In Entry" Editable.
    3. If I Keep hitting NEXT Button It goes to End Which is NEW in ID. If By mistake the superviser cliks on any combo box it will add new transaction. Which I dont Want, that the supervior can add new transaction. I just want the data in the Table Recycled if NEXT of PREVIOUS is Cliked.

    It would great help if I can fix these problems.
    Thank You
    Regards
    Aamer Sheikh
    Last edited by aamer; 03-08-2011 at 03:31 AM.

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    I received the PM you sent, but unfortunately, I cannot open your database since I do not have Access 2007/2010 here at work. From your description it sounds like you do not want anyone to be able to add a new record if they scroll past the last record. I have used the following code in the on current event of the form which detects if a new record is attempted and forces Access to go back to the first record. Hopefully this will help

    Code:
    Private Sub Form_Current()
    If Me.NewRecord Then
        MsgBox "You are not permitted to add a new record via this form"
        DoCmd.GoToRecord , , acFirst
    End If
    End Sub

  3. #3
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    I got your PM as well. Please avoid using the PM to get attention to your problem. I rarely answer PM's that do this.

    Regarding your problem (I also don't have MSAccess 2007 and cannot open the accdb)...

    1. To grab the LoginID automatically to a field on the form, see this post in the code repository:
    https://www.accessforums.net/code-re...thod-7675.html
    2. If you want to limit editing permissions on a form based upon the LoginID, see this post for an example:
    https://www.accessforums.net/code-re...mple-7538.html
    3. Check your tab order and there is a property for the form called: 'Cycle' which you can change from All Records to Current Record or Current Page. You can also put in some code in the LostFocus event of your last tabbed field so that it sets the focus to your first field (ie. me.MyOtherField.setfocus) I'm not sure what 'NEXT' button you are referring to. If it's the Navigation bar at the bottom, you may want to set it so the Navigation bar is invisible and create buttons on the form itself to go to the next or previous record (the button wizard has an easy way to create these types of buttons.)

  4. #4
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276
    pkstormy

    I checked your suggestions, but unfortunately this is not what i want. If you could open my DB only then You will understand

  5. #5
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276
    jzwp11

    Your code also did not work for me either. If possible please have a look at my DB.
    Maybe I have made my DB too complexed. That I am unable to exactly explain my Problem.
    If you could go to "supervise" form, you will understand the problem I am facing.

  6. #6
    Sciencefair is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    2
    1. If Possible Login ID Combo Should Be a text Box, and it should After update the "Last Login Entry value" in The "PettyEntryLoginBy"

    Simply go into design view and change the combo to a text box... As for the After update, I can't figure out what you're referring to have updated.

    2. All Records Are Editable. Where as I only want "Supervise" & "Problem In Entry" Editable.

    Assuming you're referring to a form, go to the form Properties and update Allow Additions to No, in any form where you don't want them.

    3. If I Keep hitting NEXT Button It goes to End Which is NEW in ID. If By mistake the superviser cliks on any combo box it will add new transaction. Which I dont Want, that the supervior can add new transaction. I just want the data in the Table Recycled if NEXT of PREVIOUS is Cliked.

    You'll have to write some code to goto first if eof or something like that.

    What does this database do? There's so many forms and so many tables macros etc, I assume it does a lot.

  7. #7
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    OK, I took a look at your database, but I don't follow what you say in your post.

    1. If Possible Login ID Combo Should Be a text Box, and it should After update the "Last Login Entry value" in The "PettyEntryLoginBy"
    The Login detail table is updated when I login, but what are your referring to by "Last Login Entry value" in The "PettyEntryLoginBy" are these forms tables/fields?

    2. All Records Are Editable. Where as I only want "Supervise" & "Problem In Entry" Editable.
    To what form are you referring where you want to restrict records?

    3. If I Keep hitting NEXT Button It goes to End Which is NEW in ID. If By mistake the superviser cliks on any combo box it will add new transaction. Which I dont Want, that the supervior can add new transaction. I just want the data in the Table Recycled if NEXT of PREVIOUS is Cliked.
    Again, to what form and what Table (table recycled) are you referring?


    Only a couple of the tables are joined in relationships. What about all of the other tables?

  8. #8
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276
    After You Login it takes you to Switchboard. On this Switchboard you see a Square button "Supervise" this will take you to supervise form where I have all these problems

    1. PettyEntryLoginBy is the combobox on "Approval Processing Main Form" Which should take the value "LastOfLogin User ID" from "Querry Last Login Querry" by default insted of it being selected manually, and this value is to be stored in "PettyCash Table" in the field of "PettyEntryLoginBy".

    2. I want to restrict records on "Approval Processing Main Form" but i want 2 combo boxes to change data i.e supervise & Problem In Entry. By Which I can Mark Them. No New Record should be added. Only ammendment to existing record.

    3. The source Table is "PettyCash Table"

    I am greatful for your efforts.

    Thx

  9. #9
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    It looks like you are passing the userID to Approval Processing Main Form in some way (I'm guessing a macro), so you should be able to change the combo box to a text box bound to the PettyEntryLoginBy field of the pettycash table without an issue.

    As to the controls you do not want the supervisor to edit, you have to set the lock property of each one of them to true when you open the form.

    As to not allowing the supervisor to add new records, the code I proposed earlier should would. It would have to be incorporated in the code behind the Next button.

  10. #10
    maximus's Avatar
    maximus is offline Expert
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    aamer i am attaching you db please check whether you problem is resolved!!!!!!!!!!!

  11. #11
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276
    Thank You Maximus
    This is exactly what I was looking for.
    I am really thankful to you from the bottom of my heart for the time and effort you spent to help me solve this great big issue for me.

    please have a look at the DB I made with a little bit of modification in querry. which is perfect , but incase if there is no new item to be supervised can give problem if cliked on supervise it adds a blank entry in the table.

    Regards
    Aamer Sheikh

Please reply to this thread with any new information or opinions.

Similar Threads

  1. creating a query? need help badly
    By MrT1993 in forum Queries
    Replies: 1
    Last Post: 02-16-2011, 10:24 AM
  2. avg/min/max data help needed badly
    By donavan01 in forum Access
    Replies: 7
    Last Post: 02-13-2011, 12:49 PM
  3. Using composite keys but stuck badly in the design
    By hmushtaq in forum Database Design
    Replies: 2
    Last Post: 01-25-2011, 12:25 AM
  4. Best way to import badly formatted data
    By mkallover in forum Import/Export Data
    Replies: 3
    Last Post: 09-16-2010, 01:59 PM
  5. help required badly
    By pradeep_siemens in forum Programming
    Replies: 0
    Last Post: 05-28-2009, 04:41 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