473,378 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

run time error 2046

489 256MB
I had to rebuild my laptop, I've reloaded my Access 2007 restored my database and program, I've checked all the references and have setup the trust locations. But when I go to open one of the forms I get this error 2046 with the message The command or action "gotorecord" isn't available now. Does anybody know what I'm missing that would give me this error. If you need further information let me know.
Thanks for any help.
May 30 '12 #1

✓ answered by dsatino

Well, I guess if it isn't 'available now', see if it's available later.

Try moving it out of the open and into the current() event.

12 14351
ADezii
8,834 Expert 8TB
Do you have any Code residing in any of the Form's Events, specifically: Open(), Load(), Current()?
May 31 '12 #2
CD Tom
489 256MB
Yes the code is in the Open() event
Expand|Select|Wrap|Line Numbers
  1. DoCmd.GoToRecord , , acNewRec
I have the program on my desktop computer and the same program works great on it. I just copies the program and the database from the desktop to the laptop after I installed the Access 2007 program.
May 31 '12 #3
dsatino
393 256MB
Check your references in the VBA editor for anything 'missing'.
May 31 '12 #4
CD Tom
489 256MB
I've checked the references and there are no errors. That was the first thing I checked when I got this error. I've also check the trust locations to make sure everything is setup there. I have this running on another computer and I checked the references there to the references on the laptop and everything is the same.
May 31 '12 #5
Mihail
759 512MB
Check the database (the file) again.
Maybe the file has a "Read Only" attribute.
That happen if you use Nero (for example) to burn a CD then copy the information from the CD in the PC.
May 31 '12 #6
CD Tom
489 256MB
I've also checked that and it's not read only, I've also check the permissions to make sure that everything was allowed. Like I said I've checked the laptop against the desktop where it is running and everything looks the same. I'm at a loss
May 31 '12 #7
dsatino
393 256MB
Well, I guess if it isn't 'available now', see if it's available later.

Try moving it out of the open and into the current() event.
May 31 '12 #8
CD Tom
489 256MB
Ok I tried your suggestion and moved the open event to the current event I got other errors but the docmd worked. I then when ahead and moved the statements back to the Open event and guess what!!! Everything is now working. So just by removing the Open event and then setting it back up fixed what ever problem there was. I don't understand but everything is now working. At least everything I've tested. Thanks for all your help
May 31 '12 #9
dsatino
393 256MB
just out of curiousity, is the file type .mdb or .accdb?
Jun 1 '12 #10
CD Tom
489 256MB
The program is Access 2007 and the application is the accdb.

Again thanks for all your help. I wish I understood why just removing the Open event and then setting it back up again did the trick.
Jun 1 '12 #11
dsatino
393 256MB
Well, during these events (open, load, etc) the program is running certain processes. By allowing programmers access to these events, the program is allowing us to add additional processes in. My guess is that there is some sort of additional information that allows your add-in to the process to be run and that information was lost. By killing your piece and then re-creating it, you re-created the lost info as well.
Jun 1 '12 #12
CD Tom
489 256MB
Well that makes sense, again I've learned something new. Next time I have a funny problem I'll try the redoing the process. Again thanks.
Jun 1 '12 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: NB | last post by:
Hi In my 2 years with Access I have never seen this, now it makes me mad In an unbound form frmTH I have a frmList which is a continous form In its on current event, I synch 4 of its fields...
0
by: Miranda Evans | last post by:
I noticed several postings about issues related to "run-time error 3061", and I observed that the solutions to these issues appear to involve correcting something within the SQL code. I'm...
2
by: Nicolae Fieraru | last post by:
Hi All, I have a table in the database and a Word document saved on the hard disk. I want to mailmerge the content of the table into the word document, all done in vba. Any examples? I...
4
by: Christaaay | last post by:
I have been using the code below successfully for almost a year. yesterday, I began getting a run time error 6 (overflow). I am using the code in an Access 2000 database. Can anyone help me...
0
by: rc | last post by:
Moved a working MS Access application from Win2000 (version 5.0 SP 3) OS with MS Access 2000 and DB2 Run-time client v7.1 FP 4 to XP (version 5.1, SP 2) OS with MS Access 2003 and DB2 Run-time...
9
by: ThunderMusic | last post by:
Hi, I'd like to create a compile time error in my class... maybe there's a way already built in in the framework so I can achieve what I want... I have 2 constructors in my class. One of them...
3
by: DontB3 | last post by:
Hi, I'm new in this forum, and i hope someone can help. I'm creating an automatic application that transfer a database from Access -> DBF -> Oracle. When My App try to execute Insert SQL...
11
by: Bryan Crouse | last post by:
I am looking a way to do error checking on a string at compile time, and if the string isn't the correct length have then have the compiler throw an error. I am working an embedded software that...
6
by: tony.abbitt | last post by:
I have recently installed Office 2007 (SP1) retaining the previous installation of Office 2003. I have converted an Access 2003 database to Access 2007. The database contains the VBA code...
4
by: drd466 | last post by:
Question: When I add code to change the record source my sub routine returns a runtime error 2046 Edit hyperlink isn't available now. The following is provides a little details I have a form...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.