473,509 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

From Access 2003 to 2007 and command is not working

ddtpmyra
333 Contributor
It use to work on my MS Access 2003 but when I start using MS 2007 it does not work anymore. Is there other settings I have to do to make it work?
Expand|Select|Wrap|Line Numbers
  1. Private Sub MR_DblClick(Cancel As Integer)
  2. DoCmd.OpenForm "frm_MRHolder", OpenArgs:=Me.MR
  3. End Sub
  4.  
Jun 3 '11 #1
7 2493
NeoPa
32,557 Recognized Expert Moderator MVP
I'm sorry to say that code would never work in Access 2003. I have no idea why you've made that mistake but procedure parameters can either be positional or named, but never both.
Jun 3 '11 #2
ddtpmyra
333 Contributor
NeoPa... should you say it will never work on Access 2003 or Access 2007 I'm confused.

My codes works at 2003 but when I open my DB in 2007 it does work. Please clarify.

thanks!
Jun 3 '11 #3
NeoPa
32,557 Recognized Expert Moderator MVP
It seems that I was in error. I've just tested it exactly as you have it (in 2003) and it does indeed work. My memory must be faulty, as I'm sure I had an error recently where I tried to call a procedure with one argument as a positional one and another as a named argument. Possibly it was as simple as trying it the other way around (Indeed i tried it that way around and it complained immediately). Once the compiler detects a named argument it doesn't allow any further non-named ones.

Nevertheless, I would try making all the arguments of the same type in future. It is more consistent and I would say better practice. It may even allow your code to work in Access 2007 too, without further changes. BTW. For more on that see Converting to Access 2007. It's a very useful page to read in your position.

Sorry for the incorrect advice earlier. It seems Access can still catch me out sometimes :-(
Jun 3 '11 #4
ddtpmyra
333 Contributor
Thanks NoePa for clarifying. I used OpenArg from my previous question (another thread) about opening a form (see the link below) and I got that idea from you (wink)

http://bytes.com/topic/access/answer...-passing-value
I'm trying to create a event from From 1 to pass a value to Form 2.

what is the other way to do it?

thanks again!
Jun 3 '11 #5
NeoPa
32,557 Recognized Expert Moderator MVP
It's probably as simple as :
Expand|Select|Wrap|Line Numbers
  1. Private Sub MR_DblClick(Cancel As Integer)
  2.     Call DoCmd.OpenForm(FormName:="frm_MRHolder", OpenArgs:=Me.MR)
  3. End Sub
Your concept is right. It's simply a better idea to use one type of argument consistently (and may well be required in versions after 2003).
Jun 3 '11 #6
ddtpmyra
333 Contributor
Expand|Select|Wrap|Line Numbers
  1. Private Sub MR_DblClick(Cancel As Integer) 
  2.     Call DoCmd.OpenForm(FormName:="frm_MRHolder", OpenArgs:=Me.MR) 
  3. End Sub 
I wonder still doesn't work. I even tried as scimple as below on click event of a button.
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm "frm_MRHolder" 
What went wrong :(
Jun 7 '11 #7
NeoPa
32,557 Recognized Expert Moderator MVP
I don't know without some clues as to what went wrong where. What error message do you see? What line does the debugger stop on? Without this information it's a bit like a question - "My database doesn't work. Why?"

Another important question - Have you checked out the link I included in post #4?
Jun 7 '11 #8

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

Similar topics

1
1984
by: nosipho | last post by:
Hi guys, I want to upgrade to Office 2003/ 2007 Pro, currently I'm using Office 2000. the problem is I have an Access database which I'm not sure if I'll be able to access it with Office 2003/...
2
4978
by: laurasesma18 | last post by:
Hi, I have a program in Access 2003 and written in Visual Basic. At some point I would like to open an Excel file automatly from Access 2003. So that the user can do some changes in this file...
1
2402
by: ramab | last post by:
Hi friends, Ive did a small application in access 2003. it comprises 1 databases, one contain tables and the other queries,forms,reports. ive saved the file in Access 2007 and has already linked the...
0
1256
by: f18jetpilot | last post by:
Does anyone know how to convert an access table to a csv file with either a macro or a module in an access database??? I can use either access 2003 or access 2007.
1
1782
by: Johnny E Jensen | last post by:
Hej Group Using C# (Visual Studio 2005) I would like to be able to create a table in an Access 2003/2007 database. I am using OLEDB provider but i can see how to do this. Can anone give me a...
1
1910
by: itasking | last post by:
Hi everyone, can someone show me how to select excell file path from access 2003. thanks.
5
10518
by: Lysander | last post by:
My collegue had to buy a new laptop that came with Office 2007 already installed. She had Access 2003 installed on top, in a different directory. None of our 2003 databases will run on her...
0
1445
by: mstres | last post by:
How to call Stored Function in Mysql from Access 2003 Access 2003 I am using as Front End and Access DB have a link table to MySql DB with ODBC connection Thank you Mike
0
1606
by: mstres | last post by:
I call SP from Access 2003 using qrydef (I am using DAO and my Access Tables link to MySQL DB with ODBC connection. I create SP in MySQL with Transaction and Error Handler. It is working find with...
2
5864
by: Satheesh V | last post by:
hi, I use DAO recordset to query database tables of MSAccess. I open the recordset and miss/forget to close it. Can anyone tell me the maximum number of recordsets that can be open at a time (on...
0
7233
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7410
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.