Can't carry out this action

  • Thread starter Thread starter Leslie Isaacs
  • Start date Start date
L

Leslie Isaacs

Hello All

A very strange thing has happenned to one of my forms - at least it's
strange to me. I hope someone can help.

I'll try to be succinct!

I have a form which contains a few textboxes and buttons, plus a subform
[child0] which displays in datasheet view.
Everything has been working fine until this morning.

I created a new textbox on the main form, with data source set as:
=[Me]![child0]![form]![presc_collected]
(what I wanted was the value of [presc_collected] from the currently
selected record in the subform.)

This didn't work, so I edited the expression to:
=[child0]![presc_collected]

This immediately appeared to work - each time a different record was
selected on the subform, the value of the new textbox on the main form
updated.
I then closed the form, saying Yes when asked if I wanted to save the
change.
But then on re-opening the form the new textbox was't working - it simply
remained blank irrespective of whichever record was selected in the subform.
That was frustrating enough, but the real pain is that the above process
seems to have corrupted the database!
None of the buttons now work - on the form that I had just edited or in fact
on any other form in the db.
Not even the cross in the form's top-right corner works.
Believing the db to be corrupted, I closed it then attempted to delete it
(it's a split db so the data is safe, and I've an up-to-date backup of the
frontend thankfully) but it wouldn't delete - I got a message saying there
was a sharing violation.
I made a copy of the frontend backup on which I repeated the whole exercise:
same result.

That's it!

Have I done something silly (it wouldn't be the first time), or is it a bug,
or what?
I would be very grateful for any ideas/suggestions.

Many thanks
Leslie Isaacs
 
I think your database is, indeed, corrupt. There are a couple of things you
might do. As far as the sharing violation, look to see if there is a file in
the same folder with your mdb file that has the extension .ldb. You should
be able to delete that. Before you delete the offending mdb, you might try
doing a decompile. Note that a decompile is only recommended in severe
cases, because it is not supported and could make it worse. To do this:
Start->Run
msaccess.exe /decompiled "path and name of your mdbfile"

If you have only lost the work of one text box, the harder fix may not be
worth the time. That is, if you can still open the database, open each
module in design view, copy the text and paste it to a text document (I use
Wordpad for this). Then, open each form and report that has code and do the
same thing. Then in the properties for the objects, set Has Module to no.

Now, create a new database and import all your objects except modules. Open
each form and report that had code, and paste it back in. paste your modules
back in.

This is not guaranteed to work and it is only useful if you have lost a lot
of work. In your case, it sounds like going to the backup and redoing the
text box would be the easiest. I would try the decompile first, however.

Good Luck

Leslie Isaacs said:
Hello All

A very strange thing has happenned to one of my forms - at least it's
strange to me. I hope someone can help.

I'll try to be succinct!

I have a form which contains a few textboxes and buttons, plus a subform
[child0] which displays in datasheet view.
Everything has been working fine until this morning.

I created a new textbox on the main form, with data source set as:
=[Me]![child0]![form]![presc_collected]
(what I wanted was the value of [presc_collected] from the currently
selected record in the subform.)

This didn't work, so I edited the expression to:
=[child0]![presc_collected]

This immediately appeared to work - each time a different record was
selected on the subform, the value of the new textbox on the main form
updated.
I then closed the form, saying Yes when asked if I wanted to save the
change.
But then on re-opening the form the new textbox was't working - it simply
remained blank irrespective of whichever record was selected in the subform.
That was frustrating enough, but the real pain is that the above process
seems to have corrupted the database!
None of the buttons now work - on the form that I had just edited or in fact
on any other form in the db.
Not even the cross in the form's top-right corner works.
Believing the db to be corrupted, I closed it then attempted to delete it
(it's a split db so the data is safe, and I've an up-to-date backup of the
frontend thankfully) but it wouldn't delete - I got a message saying there
was a sharing violation.
I made a copy of the frontend backup on which I repeated the whole exercise:
same result.

That's it!

Have I done something silly (it wouldn't be the first time), or is it a bug,
or what?
I would be very grateful for any ideas/suggestions.

Many thanks
Leslie Isaacs
 
Hello Klatuu

Thanks for your reply.

I had already tried deleting the .ldb, but got the same sharing violation
error.
What did work was a re-boot!
I have now deleted the offending db, which is fine - as you say the lost
work is only one textbox so that's OK.
So now I'm back where I was - which is wanting a textbox on the main form
that gets its value from the date/time field 'presc_collected' of the
current record selected on the subform.
Would you have any idea what the textbox's expression should be?

Thanks again
Les


Klatuu said:
I think your database is, indeed, corrupt. There are a couple of things you
might do. As far as the sharing violation, look to see if there is a file in
the same folder with your mdb file that has the extension .ldb. You should
be able to delete that. Before you delete the offending mdb, you might try
doing a decompile. Note that a decompile is only recommended in severe
cases, because it is not supported and could make it worse. To do this:
Start->Run
msaccess.exe /decompiled "path and name of your mdbfile"

If you have only lost the work of one text box, the harder fix may not be
worth the time. That is, if you can still open the database, open each
module in design view, copy the text and paste it to a text document (I use
Wordpad for this). Then, open each form and report that has code and do the
same thing. Then in the properties for the objects, set Has Module to no.

Now, create a new database and import all your objects except modules. Open
each form and report that had code, and paste it back in. paste your modules
back in.

This is not guaranteed to work and it is only useful if you have lost a lot
of work. In your case, it sounds like going to the backup and redoing the
text box would be the easiest. I would try the decompile first, however.

Good Luck

Leslie Isaacs said:
Hello All

A very strange thing has happenned to one of my forms - at least it's
strange to me. I hope someone can help.

I'll try to be succinct!

I have a form which contains a few textboxes and buttons, plus a subform
[child0] which displays in datasheet view.
Everything has been working fine until this morning.

I created a new textbox on the main form, with data source set as:
=[Me]![child0]![form]![presc_collected]
(what I wanted was the value of [presc_collected] from the currently
selected record in the subform.)

This didn't work, so I edited the expression to:
=[child0]![presc_collected]

This immediately appeared to work - each time a different record was
selected on the subform, the value of the new textbox on the main form
updated.
I then closed the form, saying Yes when asked if I wanted to save the
change.
But then on re-opening the form the new textbox was't working - it simply
remained blank irrespective of whichever record was selected in the subform.
That was frustrating enough, but the real pain is that the above process
seems to have corrupted the database!
None of the buttons now work - on the form that I had just edited or in fact
on any other form in the db.
Not even the cross in the form's top-right corner works.
Believing the db to be corrupted, I closed it then attempted to delete it
(it's a split db so the data is safe, and I've an up-to-date backup of the
frontend thankfully) but it wouldn't delete - I got a message saying there
was a sharing violation.
I made a copy of the frontend backup on which I repeated the whole exercise:
same result.

That's it!

Have I done something silly (it wouldn't be the first time), or is it a bug,
or what?
I would be very grateful for any ideas/suggestions.

Many thanks
Leslie Isaacs
 
It sounds like you already had it working just fine. I doubt the database
corruption you experienced was directly related. I would make a copy of your
backup, compile it, do a compact and repair and try it again.

Leslie Isaacs said:
Hello Klatuu

Thanks for your reply.

I had already tried deleting the .ldb, but got the same sharing violation
error.
What did work was a re-boot!
I have now deleted the offending db, which is fine - as you say the lost
work is only one textbox so that's OK.
So now I'm back where I was - which is wanting a textbox on the main form
that gets its value from the date/time field 'presc_collected' of the
current record selected on the subform.
Would you have any idea what the textbox's expression should be?

Thanks again
Les


Klatuu said:
I think your database is, indeed, corrupt. There are a couple of things you
might do. As far as the sharing violation, look to see if there is a file in
the same folder with your mdb file that has the extension .ldb. You should
be able to delete that. Before you delete the offending mdb, you might try
doing a decompile. Note that a decompile is only recommended in severe
cases, because it is not supported and could make it worse. To do this:
Start->Run
msaccess.exe /decompiled "path and name of your mdbfile"

If you have only lost the work of one text box, the harder fix may not be
worth the time. That is, if you can still open the database, open each
module in design view, copy the text and paste it to a text document (I use
Wordpad for this). Then, open each form and report that has code and do the
same thing. Then in the properties for the objects, set Has Module to no.

Now, create a new database and import all your objects except modules. Open
each form and report that had code, and paste it back in. paste your modules
back in.

This is not guaranteed to work and it is only useful if you have lost a lot
of work. In your case, it sounds like going to the backup and redoing the
text box would be the easiest. I would try the decompile first, however.

Good Luck

Leslie Isaacs said:
Hello All

A very strange thing has happenned to one of my forms - at least it's
strange to me. I hope someone can help.

I'll try to be succinct!

I have a form which contains a few textboxes and buttons, plus a subform
[child0] which displays in datasheet view.
Everything has been working fine until this morning.

I created a new textbox on the main form, with data source set as:
=[Me]![child0]![form]![presc_collected]
(what I wanted was the value of [presc_collected] from the currently
selected record in the subform.)

This didn't work, so I edited the expression to:
=[child0]![presc_collected]

This immediately appeared to work - each time a different record was
selected on the subform, the value of the new textbox on the main form
updated.
I then closed the form, saying Yes when asked if I wanted to save the
change.
But then on re-opening the form the new textbox was't working - it simply
remained blank irrespective of whichever record was selected in the subform.
That was frustrating enough, but the real pain is that the above process
seems to have corrupted the database!
None of the buttons now work - on the form that I had just edited or in fact
on any other form in the db.
Not even the cross in the form's top-right corner works.
Believing the db to be corrupted, I closed it then attempted to delete it
(it's a split db so the data is safe, and I've an up-to-date backup of the
frontend thankfully) but it wouldn't delete - I got a message saying there
was a sharing violation.
I made a copy of the frontend backup on which I repeated the whole exercise:
same result.

That's it!

Have I done something silly (it wouldn't be the first time), or is it a bug,
or what?
I would be very grateful for any ideas/suggestions.

Many thanks
Leslie Isaacs
 
Hello Klatuu

Thanks for your further reply.
I have done all that you said, then re-created the textbox with control
source =[child0]![presc_collected], which again initially seemed to work OK
but then the db became corrupted.
If you have any other ideas I would be very gretaful!

Thanks
Les



Klatuu said:
It sounds like you already had it working just fine. I doubt the database
corruption you experienced was directly related. I would make a copy of your
backup, compile it, do a compact and repair and try it again.

Leslie Isaacs said:
Hello Klatuu

Thanks for your reply.

I had already tried deleting the .ldb, but got the same sharing violation
error.
What did work was a re-boot!
I have now deleted the offending db, which is fine - as you say the lost
work is only one textbox so that's OK.
So now I'm back where I was - which is wanting a textbox on the main form
that gets its value from the date/time field 'presc_collected' of the
current record selected on the subform.
Would you have any idea what the textbox's expression should be?

Thanks again
Les


Klatuu said:
I think your database is, indeed, corrupt. There are a couple of
things
you
might do. As far as the sharing violation, look to see if there is a
file
in
the same folder with your mdb file that has the extension .ldb. You should
be able to delete that. Before you delete the offending mdb, you
might
try
doing a decompile. Note that a decompile is only recommended in severe
cases, because it is not supported and could make it worse. To do this:
Start->Run
msaccess.exe /decompiled "path and name of your mdbfile"

If you have only lost the work of one text box, the harder fix may not be
worth the time. That is, if you can still open the database, open each
module in design view, copy the text and paste it to a text document
(I
use
Wordpad for this). Then, open each form and report that has code and
do
the
same thing. Then in the properties for the objects, set Has Module to no.

Now, create a new database and import all your objects except modules. Open
each form and report that had code, and paste it back in. paste your modules
back in.

This is not guaranteed to work and it is only useful if you have lost
a
lot
of work. In your case, it sounds like going to the backup and redoing the
text box would be the easiest. I would try the decompile first, however.

Good Luck

:

Hello All

A very strange thing has happenned to one of my forms - at least it's
strange to me. I hope someone can help.

I'll try to be succinct!

I have a form which contains a few textboxes and buttons, plus a subform
[child0] which displays in datasheet view.
Everything has been working fine until this morning.

I created a new textbox on the main form, with data source set as:
=[Me]![child0]![form]![presc_collected]
(what I wanted was the value of [presc_collected] from the currently
selected record in the subform.)

This didn't work, so I edited the expression to:
=[child0]![presc_collected]

This immediately appeared to work - each time a different record was
selected on the subform, the value of the new textbox on the main form
updated.
I then closed the form, saying Yes when asked if I wanted to save the
change.
But then on re-opening the form the new textbox was't working - it simply
remained blank irrespective of whichever record was selected in the subform.
That was frustrating enough, but the real pain is that the above process
seems to have corrupted the database!
None of the buttons now work - on the form that I had just edited or
in
fact
on any other form in the db.
Not even the cross in the form's top-right corner works.
Believing the db to be corrupted, I closed it then attempted to
delete
it
(it's a split db so the data is safe, and I've an up-to-date backup
of
the
frontend thankfully) but it wouldn't delete - I got a message saying there
was a sharing violation.
I made a copy of the frontend backup on which I repeated the whole exercise:
same result.

That's it!

Have I done something silly (it wouldn't be the first time), or is
it a
bug,
or what?
I would be very grateful for any ideas/suggestions.

Many thanks
Leslie Isaacs
 
Have you checked all your VBA references?

Leslie Isaacs said:
Hello Klatuu

Thanks for your further reply.
I have done all that you said, then re-created the textbox with control
source =[child0]![presc_collected], which again initially seemed to work OK
but then the db became corrupted.
If you have any other ideas I would be very gretaful!

Thanks
Les



Klatuu said:
It sounds like you already had it working just fine. I doubt the database
corruption you experienced was directly related. I would make a copy of your
backup, compile it, do a compact and repair and try it again.

Leslie Isaacs said:
Hello Klatuu

Thanks for your reply.

I had already tried deleting the .ldb, but got the same sharing violation
error.
What did work was a re-boot!
I have now deleted the offending db, which is fine - as you say the lost
work is only one textbox so that's OK.
So now I'm back where I was - which is wanting a textbox on the main form
that gets its value from the date/time field 'presc_collected' of the
current record selected on the subform.
Would you have any idea what the textbox's expression should be?

Thanks again
Les


I think your database is, indeed, corrupt. There are a couple of things
you
might do. As far as the sharing violation, look to see if there is a file
in
the same folder with your mdb file that has the extension .ldb. You
should
be able to delete that. Before you delete the offending mdb, you might
try
doing a decompile. Note that a decompile is only recommended in severe
cases, because it is not supported and could make it worse. To do this:
Start->Run
msaccess.exe /decompiled "path and name of your mdbfile"

If you have only lost the work of one text box, the harder fix may not be
worth the time. That is, if you can still open the database, open each
module in design view, copy the text and paste it to a text document (I
use
Wordpad for this). Then, open each form and report that has code and do
the
same thing. Then in the properties for the objects, set Has Module to no.

Now, create a new database and import all your objects except modules.
Open
each form and report that had code, and paste it back in. paste your
modules
back in.

This is not guaranteed to work and it is only useful if you have lost a
lot
of work. In your case, it sounds like going to the backup and redoing the
text box would be the easiest. I would try the decompile first, however.

Good Luck

:

Hello All

A very strange thing has happenned to one of my forms - at least it's
strange to me. I hope someone can help.

I'll try to be succinct!

I have a form which contains a few textboxes and buttons, plus a subform
[child0] which displays in datasheet view.
Everything has been working fine until this morning.

I created a new textbox on the main form, with data source set as:
=[Me]![child0]![form]![presc_collected]
(what I wanted was the value of [presc_collected] from the currently
selected record in the subform.)

This didn't work, so I edited the expression to:
=[child0]![presc_collected]

This immediately appeared to work - each time a different record was
selected on the subform, the value of the new textbox on the main form
updated.
I then closed the form, saying Yes when asked if I wanted to save the
change.
But then on re-opening the form the new textbox was't working - it
simply
remained blank irrespective of whichever record was selected in the
subform.
That was frustrating enough, but the real pain is that the above process
seems to have corrupted the database!
None of the buttons now work - on the form that I had just edited or in
fact
on any other form in the db.
Not even the cross in the form's top-right corner works.
Believing the db to be corrupted, I closed it then attempted to delete
it
(it's a split db so the data is safe, and I've an up-to-date backup of
the
frontend thankfully) but it wouldn't delete - I got a message saying
there
was a sharing violation.
I made a copy of the frontend backup on which I repeated the whole
exercise:
same result.

That's it!

Have I done something silly (it wouldn't be the first time), or is it a
bug,
or what?
I would be very grateful for any ideas/suggestions.

Many thanks
Leslie Isaacs
 
Back
Top