Compile errors in function when converting from 97 to 2000

I am trying to convert an Access 97 mdb file to 2000...I 
got a compile error and when I run the debugger it stops 
at this function...
It highlights the last section...RankCheck = result
....error states...Function call on lefthand side of 
assignment must return Variant or Object.

Any ideas on what it should be changed to?

Public Function RankCheckOrig(current_value As Integer) As 
Integer
Dim previous_value As Integer
Dim previous_rank As Integer
Dim result As Integer
previous_value = Forms![Rankvariables]![previous_value]
previous_rank = Forms![Rankvariables]![previous_rank]
If current_value <> 0 Then
   If (previous_value = current_value) Then
     result = previous_rank
   Else
      previous_rank = previous_rank + 1
      Forms![Rankvariables]![previous_value] = 
current_value
      Forms![Rankvariables]![previous_rank] = previous_rank
      result = previous_rank
   End If
Else
   result = 0
End If

RankCheck = result
End Function

0
Jacqueline
7/15/2003 6:41:33 PM
access.conversion 3037 articles. 0 followers. Follow

2 Replies
935 Views

Similar Articles

[PageSpeed] 41

Looks as though you've copied the code from another function RankCheck, and
forgot to change the last line of the new function from

RankCheck = result

to

RankCheckOrig = result

I suspect you have RankCheck as a function in your application as well, and
that's what's causing that specific error message.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele


"Jacqueline" <jlacey@mun.ca> wrote in message
news:03bd01c34b00$b6a5aca0$a101280a@phx.gbl...
> I am trying to convert an Access 97 mdb file to 2000...I
> got a compile error and when I run the debugger it stops
> at this function...
> It highlights the last section...RankCheck = result
> ...error states...Function call on lefthand side of
> assignment must return Variant or Object.
>
> Any ideas on what it should be changed to?
>
> Public Function RankCheckOrig(current_value As Integer) As
> Integer
> Dim previous_value As Integer
> Dim previous_rank As Integer
> Dim result As Integer
> previous_value = Forms![Rankvariables]![previous_value]
> previous_rank = Forms![Rankvariables]![previous_rank]
> If current_value <> 0 Then
>    If (previous_value = current_value) Then
>      result = previous_rank
>    Else
>       previous_rank = previous_rank + 1
>       Forms![Rankvariables]![previous_value] =
> current_value
>       Forms![Rankvariables]![previous_rank] = previous_rank
>       result = previous_rank
>    End If
> Else
>    result = 0
> End If
>
> RankCheck = result
> End Function
>


0
Douglas
7/15/2003 10:15:01 PM
The function name is RankCheckOrig
change the last line to 
Rankcheckorig = result

On Tue, 15 Jul 2003 11:41:33 -0700, "Jacqueline" <jlacey@mun.ca>
wrote:

>I am trying to convert an Access 97 mdb file to 2000...I 
>got a compile error and when I run the debugger it stops 
>at this function...
>It highlights the last section...RankCheck = result
>...error states...Function call on lefthand side of 
>assignment must return Variant or Object.
>
>Any ideas on what it should be changed to?
>
>Public Function RankCheckOrig(current_value As Integer) As 
>Integer
>Dim previous_value As Integer
>Dim previous_rank As Integer
>Dim result As Integer
>previous_value = Forms![Rankvariables]![previous_value]
>previous_rank = Forms![Rankvariables]![previous_rank]
>If current_value <> 0 Then
>   If (previous_value = current_value) Then
>     result = previous_rank
>   Else
>      previous_rank = previous_rank + 1
>      Forms![Rankvariables]![previous_value] = 
>current_value
>      Forms![Rankvariables]![previous_rank] = previous_rank
>      result = previous_rank
>   End If
>Else
>   result = 0
>End If
>
>RankCheck = result
>End Function

0
Bruce
7/17/2003 8:40:31 PM
Reply:

Similar Artilces:

InetCntrl.exe runtime error
About a third of the time while starting my computer I get a runtime error related to InetCntrl.exe. Can you advise on what I should check to fix this? Thanks. The error message box says: Microsoft Visual C++ Runtime Library Runtime Error! Program C:\Windows\system32\InetCntrl\InetCntrl.exe The application has requested the Runtime to terminate it in an unsual way. Please contact the application's support team for more information. smsylvest wrote: > InetCntrl.exe Not part of Windows XP. Time to start using multiple anti-malware scanners to check your host. So w...

Access 97 can't resize database window
My database window with the listings of forms tables etc was adjusted to a smaller width, but resizing it is completely disabled and renders Access 2007 utterly useless for me. Is there anyway to 'reset' the window? ...

exporting outlook 2000 pst files to a database
I need to export outlook 2000 to a database- attachments and all. Is there a simple way to do this so you can search and retreive messages and attachments in a database form? Thanks Jeff You can export individual folders to access or excel to have them available for searching. I have never tried to export my entire .pst file to access or excel however. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After searching google.groups.com and finding no answer Jeff <laacid@yahoo.com> asked: | I need to export outlook 2000 to a database- ...

Excel 97 Win XP calc problem?
I have a machine running office 97 and Win XP. I have seen posts stating it runs fine, but I don't know how man people use spreadsheets that require a hard calculation: Excel will not force a calculation. i.e. ctrl-alt-f9 does not cause full workbook calculation as required. Meaning cells do not update and it doesn't calculate unless you clic in the cell to edit and hit enter. neither does the "Calc Now" button. Auto or manual calculation mode has no effect. Anybody else have this problem -- Message posted from http://www.ExcelForum.com Make sure that both the SR1 a...

Office 2003 on WinXP is receiving an error...
This operating is not presently configured to run this application.' This nmessage keeps popping up after I install WInXP Sp2. Right after I install office 2003, and I try to open MS word 2003, the above message appears. Can anyone point me in the right direction? RodneyJ Insert office cd>repair "RodneyJ" <u58446@uwe> wrote in message news:a43130535cd3e@uwe... > This operating is not presently configured to run this application.' This > nmessage keeps popping up after I install WInXP Sp2. Right after I > install > office 2003, and I t...

office 2000 [excel] cannot open previously OK file. Help
When trying to open a Microsoft Excel Work Sheet that I had accessed modified and saved to only yesterday [Office 2000] a window pops up with: "name.xls cannot be accessed. The file may be resd-only, or you may be trying toaccess a read only location. Or, the server the document is stored on may not be responding." Older files stored on the same mediums ;HD, Flash memory or 3.5in. diskette are accessed with no problem. This is on a network drive? ...

Errors saving to network drive
When my users open an Excel spreadsheet located on a network drive, make their changes, and then try to save the spreadsheet, they get an error message saying "Your changes could not be saved to Whateverfile.xls, but were saved to XXXXXXXX ( 8 digit hex number ). Close the existing document, then open the temporary document and save it under a new name" The users have been explicitly granted full rights, including Delete and Modify, to the shared folder in which the spreadsheet resides. I have disabled their Symantec Antivirus realtime protection for the time being. This pr...

Setup of CRM Server fails with unkown error
I get the following error message: Failed to install Microsoft Customer Relationship Management Server. Failed to provision your initial business. Failed to create organization. Unknown error. (80040E07). What I have already tried to do: I tried to install on our second Domain Controller (Win2K3 English), on our Primary DC (a German SBS Premium Edition), on a German Win2K3 German membership server. Always same results: the setup program can do lot of things, it can also create a new organizational unit in our ADS, create some icons in the start menu. But then it fails unexpectedly. Always...

Outlook 2000 not opening.
I am having a major problem with outlook. Can anyone tell why Outlook will not open when selecting it. When I check in the processes there is an instance of Outlook.exe there but it is not doing anything. When a different user logs onto the machine Outlook will open fine with no problems. I have deleted the users profile and recreated it but to no use. I have tried comparing the local registry keys of the two users and they seem to be the same. Can anyone please help me as I have ran out of things to try. Thanks in advance. Justin Does Outlook start in /safe mode? (I'm assumi...

Event ID: 8270 ,LDAP Error--Need help to fix it..
Event Type: Error (win2000 Srv+exchange2000) Event Source: MSExchangeAL Event Category: LDAP Operations Event ID: 8270 Computer: Exchange_2000_Server_Name Description: LDAP returned the error [b] Administration Limit Exceeded. dn: "GUID=8F37136AFCEE0B41BDD353B78F8E6067" changetype: Modify mail:USER1@Domain_Name.Domain_Suffix proxyAddresses:MS:NET/PO/User1 : CCMAIL:User1, PO at NET : SMTP:USER1@EMAIL.Domain_Name.Domain_Suffix : X400:c=US;a= ;p=Exchange_Org_Name;o=Exchange_Site_Name;s=Last_Name;g=First_Name; : smtp:USER1@MAILLIST.Domain_Name.Domain_...

Too Many IF Statements Nesting Error (Excel Formula Loop w/o VBA)
Hello Excel Problem Gurus, First of all, let me thank you in advance. I find it exemplary that you all can devote time to helping others who are having issues with their work. Hopefully one day I can be at a mentor level, and help others too. Hope you can help! I have an issue where I don't know how to write the formula that I need without going over on the nesting. The current formula that I have is as follows: =IF(OR(B7="",J7="",L7="",M7="",N7="",O7="",P7=""),"No Data",IF(V7="Yes",&qu...

Access 97/2000/2003 comparisons
I have a rather large application that uses an access 97 database (DAO). We also have a version that works with access 2000, Oracle, msde, and SQLServer (ADO). We would like to retire the DAO version of the product, but there are places where the ADO version is much slower compared to where we run DAO seeks (very noticeable when looping). So, I have a few questions. 1. Are there any tips/tricks to speed up ADO queries to compare with DAO seeks? 2. Would there be any benifit in using access 2003 over previous versions of the software besides the added features (xml support, etc). 3...

*major* functional issue with MOSS/WSS?
We are looking to move a big site over to using MOSS in a big as an alternative to shared network drives (ugh). One of the biggest issues is sending docs as attachments via email for others to edit. We'd like to get everyone to use the 'send a link' functionality from thew Sharepoint DL BUT when the user receives the email and clinks on the embedded link the doc opens read only. They then cant edit and save their changes. Seems a big an counter intuitive functional flaw. Are we missing something here? Is there any easy (for the end user) way to send those links to a doc ...

Problem with Update function of CRecordSet class
Hi All When I use from Update function of CRecordSet class, it apply to table after a few time(for example 1 second) when I need to see it at time. Thanks ...

Convert Miles to Kilometeres
Hi Is there a formula i can use that will automatically convert a number entered into Kilometers in my Access tables Ie someone has entered 3 miles and i need to know how many Kilometers it is as i am not very good with convertions -- Thank you for reading my post. Hopefully you can answer my querie Multiply the miles by 1.6 -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Shazza" <shazzalowe@hotmail.co.uk> wrote in message news:F84966F8-C15C-491A-B55A-0D41AA5C05AE@microsoft.com... > Hi > > Is there a f...

Error loading XML into DataSet
Hello, When I try to load this xml file (see below) into an asp.net dataset using the following code: ds.ReadXml("xmlfilepath\xmlfile.xml", XmlReadMode.Auto) I get the following error: "The same table (description) cannot be the child table in two nested relations. " If I take out the anchor tag in the description it works fine, however, I need the anchor tag in there. Does anyone have any suggestions? <?xml version="1.0" ?> <rss version="2.0"> <channel> <title>Liftoff News</title> <link>http://liftoff.msf...

Run time error 5 : HQClient
When I double click HQ Client I have message box "Run time error 5 : Invalid procedure call or argument" how should I do? I used RMS 2.0 -- TOY2TOY ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGr...

LNK2001 and LNK2019 errors with template class
This is a multi-part message in MIME format. ------=_NextPart_000_00BB_01C695ED.3958DA70 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have a smart pointer class that uses template functions that works = fine under VC6 but it not linking under VS2005. 1>TestGridToolkitView.obj : error LNK2019: unresolved external symbol = "void __cdecl PrismGCSmartPointer(class CPrismSmartPointer<class = CDialog> &)" = (?PrismGCSmartPointer@@YAXAAV?$CPrismSmartPointer@VCDialog@@@@@Z) = referenced in function "protected: __...

Is Outlook 2000 compatiple with Windows XP Home?
It seems to be having problems if it is... something like Outlook has experience a problem and must close. I rand the compatibility wizard, but it didn't help. Can you? Hi, I have Outlook 2000 installed on my XP Home machine and it works fine. >-----Original Message----- >It seems to be having problems if it is... something like >Outlook has experience a problem and must close. I rand >the compatibility wizard, but it didn't help. Can you? >. > Rod <anonymous@discussions.microsoft.com> wrote: > It seems to be having problems if it is... something...

delivery failure error
"The e-mail account does not exist at the organization this message was sent to" then says user unknown, even though other comupters don't have that problem. I get this error for a few clients, yet other clients can email the same address. I have Windows small business server 2000, I am pretty sure everything has updated patches. I know i security updates automatically. My clients are an updated Windows XP SR 1 with Office 2003(outlook) SR1. ...

OL 2000 should not autom send/receive on start
Hi, I found it in OL 2002 but not in OL 2000. How can I define, or better disable, that OL is trying to send/receive mails on starting and closing OL? And it should never automatically try every x minutes to do so. I found this option on OL2000 but my impression is, that OL is still polling the pop3 account for new mails. Any help on this would be appreciated. Thanks a lot Hans Tools->email accounts->send/receive settings. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail se...

on Writexml error
(Type your message here) Hi all, I have a XML file as a datasource. I read that file using dataset.readxml.Then in that dataset I make some changes. Now I want to write that changed dataset by overwriting the file that was created initially. I someone please tell me how to do it. -------------------------------- From: ratnesh gupta ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>sCyOfoucUUyYsxAsNxg9AA==</Id> ...

Error with Bold
What's wrong? With Worksheets("Recent") Range(Cells(1, 1), Cells(1, 2)).Font.FontStyle = "Bold" End with Take a look at the activesheet. I bet that range is bolded. But if you want Recent to be the sheet with the change, add a couple of dots. With Worksheets("Recent") .Range(.Cells(1, 1), .Cells(1, 2)).Font.FontStyle = "Bold" End With Without those dots, the range refers to the activesheet (if the code is in a general module). crapit wrote: > > What's wrong? > With Worksheets("Recent") > Range(Cells(1...

Excel error 1706
Whenever I try to start excel on my computer it displays an error message and it shuts itself down, any other program from the office pack works properly, except for the one I mentioned. I reinstalled it and it does the exact same thing. Thanks in advance. ...

Outlook 2000 #187
When I launch Outlook 2000, it hangs up. I've installed the upgrade from Office 97 to Office 2000. Can anyone tell me why outlook hangs up. I've check the properties and verified my internet e-mail information. Regards, J. Tolbert Fuller, jr. Houston TX 77093-8411 E-Mail: johntoljr@earthlink.net Fuller John T. <anonymous@discussions.microsoft.com> wrote: > When I launch Outlook 2000, it hangs up. I've installed > the upgrade from Office 97 to Office 2000. Can anyone > tell me why outlook hangs up. I've check the properties > and verified my inte...