Results 1 to 12 of 12
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Strange Message on Opening an Access database (Access 2000 SR-1A)

    I have an database in access with a main form that is set to open automatically on opening the database.
    But occasionally I get a strange error message that goes like this:
    "You tried to commit or rollback a transaction without first beginning a transaction"
    Sometimes this message is preceded by:
    "The Microsoft jet database cannot find the object ".
    Make sure the object exists and that you spell its name and path correctly"
    (The bad English is present in the message - it is not a typo)
    Anyone seen this before?
    If I do a compact and repair it fixes it for a while.
    If I ignore it then eventually the database goes corrupt.
    Can anyone elucidate?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Strange Message on Opening an Access database (Access 2000 SR-1A)

    I would recommend that you create a new database and import the objects. Then do a <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=44732&page=& view=&sb=&o=&vc=1#Post44732>decompile</A>, compile, compact and repair.

    I've seen odd behavior in complex databases that I've eventually tracked down to a single line of code that appeared innocuous but apparently caused the Jet engine to corrupt itself. Unfortunately, it isn't something that can be diagnosed remotely. Have you tried breaking into code when you receive the error message to try and determine where the error is occurring?
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Strange Message on Opening an Access database (Access 2000 SR-1A)

    Thanks Charlotte, I did actually do all this a few months back but the problem persists. I did do a decompile /msaccess etc before compiling etc.
    However I will try again in case one step was incorrect and see. The code that runs on opening the form is just this:

    Private Sub Form_Open(Cancel As Integer)

    Me.StatusWindow.SetFocus
    Me.StatusWindow.Text = "First select the date you are doing the till for." & vbCrLf & _
    "If it is already correct, click NEXT"

    Me.DateforTill.SetFocus

    Me.Next.Visible = True

    End Sub

    This doesn't strike me as being very difficult for access to manage.
    I don't know a lot about Transactions (yet) but it would seem that Access thinks I am trying to undo an a data transfer in some sort of Client/Server situation. But my database is really a File/Server setup with a front and back end, not really a client/server setup, isn't it?

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Strange Message on Opening an Access database (Access 2000 SR-1A)

    Sorry Charlotte I didn't see your second paragraph at first. I will try to do what is suggested there too.

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Strange Message on Opening an Access database (Access 2000 SR-1A)

    Charlotte, another small question. I can't find out how you creat a hyperlink in a post as you have done with the word 'decompile'.
    I have sometimes wanted quote one in a reply to someone but never could see how.

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Strange Message on Opening an Access database (Access 2000 SR-1A)

    You use the either the [ url] link [ /url] or the [ url=link] description [ /url] tags from the 1-click tagpanel. Paste the url of the message in to the area where "link" occurs above.
    Charlotte

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Strange Message on Opening an Access database (Access 2000 SR-1A)

    Well, first I have to ask what StatusWindow, DateForTill and Next are? Are these controls or properties of the form? If controls, what kind? One of the big problems with using the dot operator for controls is that it confuses others reading your code as much as it sometimes confuses Access. I would suggest replacing the dot operators with bangs and see if the problem clears up.

    You sometimes see that error message when your code tries to cut across a couple of operations at once. There actually are transactions going on in forms even though you don't see them, so the message isn't entirely bogus, it is just confusing.

    I built a form and guessed that StatusWindow and DateForTill were textboxes and Next was a button. I used your code and didn't get any error message. However, since I was using an unbound form, that may not be a valid test. Is anything else going on in your code at the same time?
    Charlotte

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Strange Message on Opening an Access database (Access 2000 SR-1A)

    Charlotte, I must be really blind but I can locate this 1-click tag panel for the life of me! Please, where is it?

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Strange Message on Opening an Access database (Access 2000 SR-1A)

    When you post a new message or a reply the 1-click tagpanel shows up as a link above the text box and to the right of the Subject box. Click the link and you'll see the panel pop up. In the top row at the right are two link buttons, 1 and 2. The first is a straight link and the other allows you to use a description and hide the link. If you're still having trouble, here's the link to the <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/tagpanel2.pl> panel</A>
    Charlotte

  10. #10
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Strange Message on Opening an Access database (Access 2000 SR-1A)

    Well, here is what they are:
    StatusWindow is a text box contain help/tips for the user.
    DateforTill is a combo box based on a simple query for the row source which itself is based on a table calls Days which holds a range of dates and weekday names.
    Next is indeed a command button which makes various controls on the form appear or disappear.

    I'm fascinated by your discussion of dots and bangs.
    At first I was totally bamboozled but I guess you mean
    '.' versus'!' in code?
    I never did quite know why people used both.
    David

  11. #11
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Strange Message on Opening an Access database (Access 2000 SR-1A)

    Right! I was looking everywhere but the <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/newreply.pl?Cat=&Board=acc&Number=79551&page=&view =&what=showthreaded&sb=&o=>logical place.</A>

  12. #12
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Strange Message on Opening an Access database (Access 2000 SR-1A)

    Sorry, I should not have assumed you would understand. Yes, periods are referred to as dots and exclamation points as bangs. The dot usually denotes methods or properties or collections of an object, while the bang usually denotes members of a collection. It isn't quite that clear cut though.

    In SQL, for example, you use dots to separate the fieldname from its parent table but you have to use the bang to refer to a form's control object. Since someone discovered that using the dot operator would allow them to use intellisense to find the name of the controls in the form's members collection, it has become not uncommon to see it used as you used it. It isn't wrong, but I avoid it because it can be confusing.

    There's some shorthand going on when you refer to controls anyhow. What you're actually doing is referring to members of the form's controls collection, and the bang tells you that without having to write Form.Controls!Controlname.
    Charlotte

Posting Permissions

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