Re: Help!!! Access Customer Form List

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Slick123
    New Member
    • Feb 2008
    • 9

    Re: Help!!! Access Customer Form List

    hi there

    urgent help required

    i am trying to do a customer search function on my database as well as add edit and delete functions, all were working previously however for some reason its broken now

    ive got a sample database if someone is willing to help me
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    There are lots of people here who are willing to help you, post more detail reguarding your problem and help you will receive

    Comment

    • Slick123
      New Member
      • Feb 2008
      • 9

      #3
      i am using a customer module and edit and remove buttons on the actual customer form.

      basically the delete customer function in the module is giving me errors

      Sub DeleteCustomer( CustomerNo As Long)
      'used to delete a customer as specified by CustomerNo, called by frmCustomerList

      'set reply variable
      Dim Reply As Integer

      'set the database
      Dim dbCustomer As Database

      thank you

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        Code:
         Sub DeleteCustomer(CustomerNo As Long)
            'used to delete a customer as specified by CustomerNo, called by frmCustomerList
            
            'set reply variable
            Dim Reply As Integer
            
            'set the database
            Dim dbCustomer As Database
        If this is all the code you have, I'm sure you are getting error messages! We really need to see all of the code from the DeleteCustomer sub, from the line

        Sub DeleteCustomer( CustomerNo As Long)

        down to the line

        End Sub.
        Originally posted by slick123
        i am trying to do a customer search function on my database as well as add edit and delete functions, all were working previously however for some reason its broken now
        Also, you need to be a little more explicit as to your actual problems; "its broken now" doesn't really give us a lot of detail!



        Welcome to TheScripst!

        Linq ;0)>

        Comment

        • Slick123
          New Member
          • Feb 2008
          • 9

          #5
          is it possible for me to send u the file as it is hard for me to describe the error

          the code runs with a module please help

          Comment

          • missinglinq
            Recognized Expert Specialist
            • Nov 2006
            • 3533

            #6
            You'll need to zip the database up then attach it to your post.


            1. Zip the mdb file
            2. Reply to this post, giving the Access version you're using, so that people who can't run the file don't download it
            3. Hit Submit Reply
            4. Immediately click on the Edit/Delete button (bottom right hand)
            5. Scroll down to gray button marked "Manage Attachments"
            6. Attach the zip file
            7. Click on "Save Changes" button
            Linq ;0)>

            Comment

            • Slick123
              New Member
              • Feb 2008
              • 9

              #7
              hi there people i am using microsof access 2000 file format i am sure it will also work on 2003 and 2007 versions

              please help me to get this attached database working your help will be highly appreciated
              Attached Files

              Comment

              • Slick123
                New Member
                • Feb 2008
                • 9

                #8
                i am getting errors on my edit customer and remove customer buttons and my search function is totaly not working

                Thank You

                Comment

                • missinglinq
                  Recognized Expert Specialist
                  • Nov 2006
                  • 3533

                  #9
                  My best guess would be that you've got some kind of corruption going on. In just going behind the scenes to look at the code, to see how things were set up, I had the app freeze up on me several times! Also, in just scrolling thru code behind the customer list form, Access started hopping back and forth to the code of other forms! I have to say I've never seen anything like it!

                  I'd try creating a new, blank database, importing all the objects into it, and see if that corrects the problem. If not, you'll need to google using the terms "MS Access" and "corruption " and see what you can find. There're lots of sites out there with good advice on dealing with corruption.

                  Sorry I can't be of more help!

                  Linq ;0)>

                  Comment

                  • Slick123
                    New Member
                    • Feb 2008
                    • 9

                    #10
                    thank you for your help i shall try that out

                    thank you

                    Comment

                    • Scott Price
                      Recognized Expert Top Contributor
                      • Jul 2007
                      • 1384

                      #11
                      I would agree with Linq... I think you've got some corruption going on. I downloaded your test database, Compacted/Repaired, Decompiled, Compacted/Repaired again, and then opened up the code window to look around.

                      While trying to re-compile, it hung on several keywords that shouldn't have any problems... Also while attempting to call up the help for DAO.Database (just was testing to see what was happening) DAO didn't register, and Database called up the help section for Option Compare! What this tells me is that there is a disconnect between what the code says in plain text, and what the database thinks it says, which means corruption.

                      Usually a decompile will help this type of problem, but having already done that on your database, I think it's too far gone for that. You can try doing so more than once, but I'd say your best bet is like Linq suggested, to create a new database from scratch and import all objects into it, then copy and paste the code back in.

                      Regards,
                      Scott

                      Comment

                      • missinglinq
                        Recognized Expert Specialist
                        • Nov 2006
                        • 3533

                        #12
                        Listboxes are meant to be used to select data; Forms are meant to be used to display data. So the real question here is, although this app has apparently worked in the past, why in the world would anyone elect to use a Listbox in this situation, rather than a bound Form? In using a bound form, adding, deleting and editing records can be done, if need be, without the use of a single line of code, while doing it in this manner, with an inappropriate Listbox, requires 182 lines of code!

                        Linq ;0)>


                        Linq

                        Comment

                        • Slick123
                          New Member
                          • Feb 2008
                          • 9

                          #13
                          thank you very much for ur help looks like im going back to the drawing board :(

                          Comment

                          Working...