Copying buttons from previous form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I had a database that had user level security. It was decided not to use
that anymore. I had to import all the forms, tables, etc.. to a new
database. Now my buttons don't work. I try to set up new buttons using
using command button wizard since I don't know how to set up "code" When I
try to add button I get error - Method 'module' of object'_Form_Input' failed
- Any suggestions?
 
Katie

When you copy the buttons from one form to another, you only get a "pretty
face". Until you open the code module associated with the old form, copy
the code that related to those buttons, and paste the code into the new
form, the new form has nothing to do when you click the buttons.
 
Hi, Katie.

I'm confused, because importing a form brings the code module with it in
Access 2000, although it won't bring all the data sources and/or other forms
that your command button code might refer to. Click on the [Event Procedure]
in the OnClick event of one of your buttons that isn't working, and cut and
paste the code here. If there isn't any code, Jeff's suggestion should solve
your problem.

Sprinks
 
I tried copying the code and it didn't work. I tried starting making a new
form and adding the button to it and I got the message The expression On
Click you entered as the event property setting produced the follow error:
Error accessing file. Network connection may have been lost. I also get the
message when I try to copy the code.
 
Ok I think I figured out what's happening but I don't know how to fix it. I
was trying to copy the code to a module, but i needing to copy the code to a
Microsoft Access Class Object - Form_Input. When I click on it to add it -
it tells me Error Accessing file. Any suggestions as to why I'm getting this?

Sprinks said:
Hi, Katie.

I'm confused, because importing a form brings the code module with it in
Access 2000, although it won't bring all the data sources and/or other forms
that your command button code might refer to. Click on the [Event Procedure]
in the OnClick event of one of your buttons that isn't working, and cut and
paste the code here. If there isn't any code, Jeff's suggestion should solve
your problem.

Sprinks

Katie said:
I had a database that had user level security. It was decided not to use
that anymore. I had to import all the forms, tables, etc.. to a new
database. Now my buttons don't work. I try to set up new buttons using
using command button wizard since I don't know how to set up "code" When I
try to add button I get error - Method 'module' of object'_Form_Input' failed
- Any suggestions?
 
Katie,

I'm not sure where you're trying to do this, but copy the code, open your
form in Design View, click View, Code, and paste your code there.

Hope that helps.
Sprinks

Katie said:
Ok I think I figured out what's happening but I don't know how to fix it. I
was trying to copy the code to a module, but i needing to copy the code to a
Microsoft Access Class Object - Form_Input. When I click on it to add it -
it tells me Error Accessing file. Any suggestions as to why I'm getting this?

Sprinks said:
Hi, Katie.

I'm confused, because importing a form brings the code module with it in
Access 2000, although it won't bring all the data sources and/or other forms
that your command button code might refer to. Click on the [Event Procedure]
in the OnClick event of one of your buttons that isn't working, and cut and
paste the code here. If there isn't any code, Jeff's suggestion should solve
your problem.

Sprinks

Katie said:
I had a database that had user level security. It was decided not to use
that anymore. I had to import all the forms, tables, etc.. to a new
database. Now my buttons don't work. I try to set up new buttons using
using command button wizard since I don't know how to set up "code" When I
try to add button I get error - Method 'module' of object'_Form_Input' failed
- Any suggestions?
 
Thanks for the help. I know it will work if I can ever figure out why i'm
getting the message error accessing file.

Sprinks said:
Katie,

I'm not sure where you're trying to do this, but copy the code, open your
form in Design View, click View, Code, and paste your code there.

Hope that helps.
Sprinks

Katie said:
Ok I think I figured out what's happening but I don't know how to fix it. I
was trying to copy the code to a module, but i needing to copy the code to a
Microsoft Access Class Object - Form_Input. When I click on it to add it -
it tells me Error Accessing file. Any suggestions as to why I'm getting this?

Sprinks said:
Hi, Katie.

I'm confused, because importing a form brings the code module with it in
Access 2000, although it won't bring all the data sources and/or other forms
that your command button code might refer to. Click on the [Event Procedure]
in the OnClick event of one of your buttons that isn't working, and cut and
paste the code here. If there isn't any code, Jeff's suggestion should solve
your problem.

Sprinks

:

I had a database that had user level security. It was decided not to use
that anymore. I had to import all the forms, tables, etc.. to a new
database. Now my buttons don't work. I try to set up new buttons using
using command button wizard since I don't know how to set up "code" When I
try to add button I get error - Method 'module' of object'_Form_Input' failed
- Any suggestions?
 
"Katie" wrote in message
Thanks for the help. I know it will work if I can ever figure out why i'm
getting the message error accessing file.

Hi,

Are you using Access 2000 without SP3 installed by
chance? Is so read on.

I think you've been stung by a particularly nasty bug in
Access 2000. Sure sign is that dreaded "Network Connection
may have been lost.." messsage. Details about it can be
found here:

http://support.microsoft.com/?id=304548

The corruption in your database may not be recoverable.
You might try importing everything into another database.
I believe this bug is fixed with Service Pack 3, but it
will not *fix* corruption already present. To avoid this
bug you absolutely, positively, have to compile your
database EVERY time you import something.

Also, (from Dirk "Yoda" Goldgar) one other thing you might
try first is decompiling your database -- or rather, a
copy of it. Instructions for how to do this may be found
here:

http://www.mvps.org/access/bugs/bugs0008.htm

and here:

http://www.granite.ab.ca/access/decompile.htm

This was also posted by someone from Microsoft (my next employer):

326605 ACC2000: Issues Fixed in Access 2000 by Office 2000 Service Pack 3
http://support.microsoft.com/?id=326605

304548 ACC2000: Error Message: Error Accessing File. Network Connection May
http://support.microsoft.com/?id=304548

After applying Office 2000 sp3 you are going to need to salvage your
database modules (Standard, Forms/Reports) by saving them out to text
files. Example:

- Open Form/Report in design view and select menu option View > Code
- Select the menu option Edit > Select All (to select vba code)
- Select menu option Edit > Copy
- Paste in Notepad file
- Close VBA window to return to Form/Report
- Within the properties Window of Form/Report change the property "Has
Module" from "Yes" to "No"
(this will delete the code behind the object)
- Save your Form/Report
************* Repeat above steps for each Form/Report that has code
*****************
- For your Standard module just open and copy to text files

- Then import all your objects (within exception of your Modules) to a new
database file
- Copy the code from the above text files into new modules in your new
database
- For the Forms/Reports reverse the steps by opening their VBA modules and
pasting the code from the text files

*******************************
You can also try running decompile switch but the above methods are
normally your only shot..


I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access
Good luck,
 
Thank you. That is exactly what the problem was. I was able to copy
everything to a new database and just redesigned my forms. It's working now.
The database was still in testing so no important data has been lost. Thank
you for all the helpful suggestions.
 
in message:
Thank you. That is exactly what the problem was. I was able to copy
everything to a new database and just redesigned my forms. It's working now.
The database was still in testing so no important data has been lost. Thank
you for all the helpful suggestions.

Excellent, that is very good news!
Now make several backup files of this *good* database container before
doing anything else. Also, go to Office Update and apply all service packs
and updates to your Access version before doing any further development.

You're welcome for the help.
Thanks for the feedback.
 
Back
Top