Converting VBA For Access97 To Access2000
Nov 13, 2003
My organization recently upgraded from Office97 to Office2000. A database that we had on 97 is giving us errors when we try to run it under 2000. I have been able to fix some of the errors. This one has me stumped.
I'm getting an error 13; type mismatch and it is calling out this line:
Set Mydb = DBEngine.Workspaces(0).Databases(0)
Any help is greatly appreciated. This is the complete function:
Function RegistrationData(Reqinfo As String) As String
On Error GoTo error_registrationdata:
Dim Mydb As DAO.Database
Dim MyRS As DAO.Recordset
Set Mydb = DBEngine.Workspaces(0).Databases(0)
Set MyRS = Mydb.OpenRecordset("REGISTRATION")
Select Case Reqinfo
Case "CommandName"
RegistrationData = MyRS.COMMAND
Case "CommandCode"
RegistrationData = MyRS.COM_CODE
Case "CommandAddress"
RegistrationData = MyRS.COM_ADDRESS
Case "CommandManager"
RegistrationData = MyRS.COM_MANAGER
Case "CommandPOC"
RegistrationData = MyRS.COM_POC
Case "CommandPhone"
RegistrationData = MyRS.COM_PHONE
Case "CommandFax"
RegistrationData = MyRS.COM_FAX
Case "ClinicName"
RegistrationData = MyRS.CLINIC
Case "ClinicCode"
RegistrationData = MyRS.CLI_CODE
Case "ClinicAddress"
RegistrationData = MyRS.CLI_ADDRESS
Case "ClinicManager"
RegistrationData = MyRS.CLI_MANAGER
Case "ClinicPOC"
RegistrationData = MyRS.CLI_POC
Case "ClinicPhone"
RegistrationData = MyRS.CLI_PHONE
Case "ClinicFax"
RegistrationData = MyRS.CLI_FAX
Case "MailDir"
RegistrationData = MyRS.MAILDIR
Case "HROFile"
If Not IsNull(MyRS.HROFile) Then
RegistrationData = MyRS.HROFile
Else
RegistrationData = "error"
End If
Case "AboutYN"
RegistrationData = MyRS.ABOUTYN
Case "ActivityName"
RegistrationData = MyRS.ActivityName
Case Else
RegistrationData = "error"
End Select
end_registrationdata:
Exit Function
error_registrationdata:
MsgBox "There was an error retrieving data from the Registration Table. Please ensure all data is filled in correctly."
RegistrationData = "x"
Resume end_registrationdata:
End Function
View Replies
ADVERTISEMENT
Aug 4, 2005
...not too much in the archives on this one, so any help appreciated...
We have an Access97 MDE with a split backend that is shared over a network.
Most of our users have WinNT installed and the Access application works fine. We have a user who has Win2K and Office2k and every time this person tried to launch the Access97 app, he receives the following error:
The database that you are trying to open or convert is currently in use, or you do not have permission to open it exclusively.
I have checked the Security Permissions for that user and he actually has full rights (Admin) for the Network folder.
Anyone else experienced this ?
View 2 Replies
View Related
Dec 7, 2006
I am using access 2000. I have created a database that is working well but have created a form in which I want to place photos. I have created a bound object frame which is linked to field in table. Problem When I go to insert picture in object frame it is placed there as a "Package". It will not place the actual picture as is. How do I get rid of this Package?
View 1 Replies
View Related
Nov 9, 2004
Hi , I am working on a project and am a beginner in this field. My difficulty is that i need to print the details on a form (which has a subform ) into the invoice.xls in Excel2000 . I have managed to get all the required data including the first record in my subform in excel , but i donot know how to print/get the next record . I have tried using recordset,cmd.Gotorecord, query and Macros to do so.
Pls Help.
View 4 Replies
View Related
Jul 25, 2005
I'm familiar with SQL but not with Access97 - some wierd syntax here!
I'm creating a Query that is to Delete records from a table depending on a non-key field in a second table.
I first tried an INNER JOIN
DELETE Activity_Preferences.*
FROM Activity_Preferences INNER JOIN Activity_Key
Activity_Preferences.Activity_Key=Activity_Key.Act ivity_Key AND Activity_Key.Complete=1;
which was initially accepted but then complained about the INNER JOIN after I went in a second time to 'fix' the error.
I've finally got the following syntax accepted:-
DELETE Activity_Preferences.*
FROM Activity_Preferences, Activity_Key
WHERE Activity_Preferences.Activity_Key=Activity_Key.Act ivity_Key AND Activity_Key.Complete=1;
But when executed still gets the following error (same as for the INNER JOIN):-
'Operation must use an updatable query'.
What else is needed?
J.
:confused:
View 4 Replies
View Related
Nov 7, 2005
I have a multi user 97 DB which also has a 2000 front end with tables linked to the 97 version. The 97 version won't open on 97 machines, 'unknown database format'......at first I thought someone had converted it but it doesn't look like that has been done. When I open on a 2000 machine there is no option to 'convert to a previous version'.
I have run compact and repair on both DB's.
Any ideas what the problem could be.
Thanks
RussG
View 2 Replies
View Related
Dec 14, 2005
I am a long time user of ACCESS but use ACCESS97 for specific reasons. Have ACCESS97 operating on a PC with Win2000 and WinXP Home. Recently had to buy a new PC with WinXP Professional. Cannot seem to install the software. In the process get some error messages. First,
"An error has occurred at changing workgroup data base"
I click OK then get,
couldn't create SYSTEM.MDW file; after setup completes, reboot and run Workgroup Administrator before you run this application
I don't know what to do next. Do not know what the Workgroup Administator is. Two questions:
1. Is it possible to run ACCESS97 on this OS?
2. If so, can you advise on how to do the installation successfully?
I appreciate any help that anyone can provide. Cheers!
View 1 Replies
View Related
Feb 27, 2006
Hi! I've got a problem with a csv file from our MRP system. It always contains spaces BEFORE the data in the fields and I need to ignore them when I group the data. The crosstab report works absolutely fine but I don't get the right output because of those darned spaces!!:mad:
HELP!!:confused:
View 3 Replies
View Related
Nov 28, 2005
Hi All,
I've been working on many other domains but very new to Access world. Anyway,coming to the point.I have a database built on Access and the reporting is being done on Excel.Till now,there is no connection between both.Users are doing copy/paste procedure for reporting in excel.i tried to connect both and get the data directly in to excel with out copy/paste procedure(i.e., just by refreshing the excel sheet would do). But when i create an ODBC connection between them, it says that the required permissions are not given to you by the administrator.I'm trying to create a file DSN.so,can anyone tell me what exactly i need for this?is it the admin rights of access database (or) the admin rights of the folder where the mdb file is located?little confused on this.I already have the admin rights on the folder where the mdb file is located but still getting the error.admin rights of the datasbe cannot be given because no one knows the password of administrator ID of Access database(little funny but it is the fact!)
can anyone please let me know how can i get through this problem as this would be the crucial thing for this project.
Regards,
Ravindra
View 1 Replies
View Related
Dec 14, 2005
Hi! We have a problem with analyse reports generated automatically since we are using Access2000. Attached to this mail you may find a screenshot of the desired report. When we try printing query analyses with the sql syntax exactly that happens (see attachment). Thanx for your help,... Stefan
View 2 Replies
View Related
Dec 19, 2007
I bought a database about 10 years ago and still uses it. Since then we changed our address and need to update all the forms as the address is hard coded into the forms. When I tried to modify any thing it tells me I don't have the Permission. I tried to contact the programmer, but he's been out of business years ago and was unable to contact him.
How do I reset the permission on MDB? I tried Tools->Security->User/GroupPremissions and it only shows Admin user with "Read Design" checked on all object names. And if I check on any other permission it says I need administer permission.
I tried upvmsa2k.zip "Users' passwords viewer v3.2" and it shows admin user with garbled up password. Also tried MDWRecovery, but it says there's no user or password.
Your help would be greatly appreciated.
View 3 Replies
View Related
Mar 12, 2008
PLZ direct me about this security problem in Access 97.
I heve a serious problem with security of MDB files in ACCESS 97.
I heve a MDB database file in my company and shered it on my system so every other user have remote access to MDB file. then I created a workgroup file (.MDW) and enabled multiuser security For the shared MDB file but when each user dejoin from administrative workgroup file (.mdw), He/she can access to all table without any user/pass control.
How can I do with this problem, is there any reliable solution for multiuser security in Access 97 database files.
View 2 Replies
View Related
Oct 5, 2004
I noticed that I did not put a question mark next to this the first time I posted it, so maybe it was not clear that I was hoping for a response. Here I go again. We are trying to reinstall Access97 (the OS is Office XP) and having problems getting all of the drivers to install. Using the "Add or Remove Programs" in the Control Panel to make sure that all drivers have been installed, it says that the Excel drivers are installed, though it is grey, which I take to mean that it is not completely installed. On the computer in question, it says that the database drivers take up 1329k and the excel drivers are" installed" (no size listed). On my computer, on which the excel drivers are available, it lists the database drivers as 2009k and the excel drivers 258k (it does not say "installed"). Anybody have any ideas?
View 1 Replies
View Related
Dec 2, 2005
does anyone know if it's possible to "install" the runtime version of access 97 (we do have developer's edition, so can distribute the run-time version) to a thumb drive so that it would run without having to install it on each computer that one was going to use the thumb drive on - is there any add'l software that would make this possible/ - the application is for figure skating clubs - with distribution of up to 1000 copies - the idea is to distribute them to member clubs and various officers could use the application and exchange up-to-date data by passing on the thumb drive - this also would hpefully avoid all installation problems with pc's having various versions of access already installed, etc. - thanks for any suggestions- jim
View 6 Replies
View Related
Jan 4, 2006
I am converitng a database with quite a bit of associated code from A97 to A2000. The following fails:
Dim ctlSample As Control
Set ctlSample = CreateControl(frm.Name, acLabel, acDetail, "", _
, sngLeft, sngTop, conWidthLabel, conHeight)
'set properties of the sample label
With ctlSample
.Caption = rst!SampAbrv
Is there a new syntax for ctl.caption in 2000? I've tried help and a web search but no joy.
Thanks,
Tiffany
View 11 Replies
View Related
Jun 23, 2006
After doing a search, i receive this error(3326) when I insert the found info. J
View 1 Replies
View Related
Jul 24, 2006
The Access2000 database is on a server located on our office network. Our office has a mixture of WindowsXP and Windows2000 as the operating system. We are using Novell Netware for the office network. I am wondering if the Novell Network is "confusing" Access???The check box option to open Access2000 as a multiuser database ischecked. Also "No locks" is checked. When the database is opened weget the "LBD" file with "access.lockfile.9". When I look at this file,I see my name and the word "Admin", which seems normal. However, ifanother user attempts to open the database, they can't and they get amessage that another user is using the program.According to Micorsoft, Access must be in a shared directory. Sinceeveryone can read/write/create/delete to the directory it appears "shared".Nevertheless, is it possible that the Novell Network has a conflictwhich prevents Access from being shared? --------------------------------------------------------------------------------------I took the database home (to my home network) and had limited sharing success. First, the folder that access is in must be fully labeled as shared, read/write privileges by themselves don't seem to allow multiuser access. Second, after closing the database, I would get a "can't find" the database message from windows explorer even though the file was visible.
View 14 Replies
View Related
Feb 9, 2006
Hi All :)
Can any one help me to get this done. Here is my case ..
There is column1 called as "Status" in a table "Company List".
There is column2 called as "Date" in a same table "Company List".
My requirement is ..
Whenever I update column1 "Status" as "Done" and move to next Row. Column2 "Date" should update automaticaly with system date.
Can any one please help me in this reagrd.
Thank you in advance..!
Narayan
View 4 Replies
View Related
Jun 7, 2007
Hi, i am using the following code to open another access database. it works fine in fuilltime but when i install a runtime version I get an 'active x cant creat object' error. Does anyone knwo why this is?
Dim appAccess As Object
Const strPathToBackup = "C:interim.mdb"
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase strPathToBackup
appAccess.Visible = True 'do not show database
appAccess.Run "Test"
appAccess.CloseCurrentDatabase
Cheers
Tania
View 11 Replies
View Related
Sep 15, 2004
I am importing a text file into Access97 using fixed width with import specifications that specify NO to indexing. However, when I run the Macro, it automatically indexes the first field (which is a long integer).
Why? How do I import the text file without having the index automatically added?
View 2 Replies
View Related
Aug 8, 2005
I am working on a report in Access2000 which is getting information from several tables via a number of queries.
I am using nested IIf() functions to combine text formatted data in a calculated query field before using it in a report.
One such IIf() function is
Desc_col: IIf([HOVR - UDP].[SERVICE] Is Not Null,[DA] & " " & [SEQ] & " " & [TYPE] & [MO] & " " & [SUB] & " - " & [HOVR - UDP].[SERVICE],
IIf([MinOfCCT] Is Not Null,"I/O DIST CAB " & [UDP - JC CIRCUITS-05-F].[PWR] & " - CCTS " & [MinOfCCT] & " thru " & [MaxOfCCT],IIf([DESCRIPTIO] Is Not Null,[DESCRIPTIO],"Spare")))
When I have tried to do the same thing with date fields it does not work. The function is fine as long as it is not nested.
That is
Rev_col: IIf([Rev_HOVR] Is Not Null,[Rev_HOVR],"")
and
Rev_col: IIf([Rev_Elec_equip] Is Not Null,[Rev_Elec_equip],"")
both work.
But when I combine them into a nested function
Rev_col: IIf([Rev_HOVR] Is Not Null,[Rev_HOVR],IIf([Rev_Elec_equip] Is Not Null,[Rev_Elec_equip],""))
I get an error message "! Data type mismatch in criterial expression"
There is no data mismatch in the original tables from which the information was extracted. The dates are all in DATE/TIME and set to "General"format in the tables.
I am wondering if I will have to use Visual Basic function to combine these fields. However that poses a problem. When I've looked at this I find that runtime VB is no longer available in Access and I do not want to go out and buy it on the offchance that it will work.
Can anyone tell me if there is another solution to my problem?
View 4 Replies
View Related
Oct 13, 2005
Is there a good replacement for the use of local forms in an Access database? We have a large A97 replicated database application that we are trying to update. We use local forms for data output. Since these are no longer available we are looking for a workaround.
many thanks
View 5 Replies
View Related
Feb 12, 2008
Hi,
I want a user to click the report, and an input box appears asking for a product number. This product number is used in a recordset (VBA code in the report) to fill the text boxes in the Detail section.
Code:Private Sub Report_Open(Cancel As Integer)Dim rst As DAO.RecordsetDim db As DAO.DatabaseDim itemCode As StringSet db = CurrentDb()itemCode = InputBox("Enter the Item Number", "Complete Catlog Prices")Set rst = CurrentDb.OpenRecordset("SELECT * FROM [Catalog Prices Complete] WHERE Prefixprodno = '" & itemCode & "'", dbOpenDynaset)Do Until rst.EOF Me!txtCat = rst("Volume") 'error 02448 cannot assign to this 'Me!txtPrice = rst("Price") rst.MoveNextLooprst.CloseEnd Sub
I'm sure my text box is called txtCat though. Is it an array I should try to fill? If so, any suggestions :S
Thanks,
View 3 Replies
View Related
Sep 26, 2005
Dear Guys,
How to Establish the connection between Ms-Access2000 & Oracle using DAO Connection through Code?.
I created one table in Oracle and I created User-DSN in ODBC.
I linked that oracle table into Ms-Access MDB using Link table option in ms-Access.
Now, Whenever I open that mdb, we need to establish the ODBC connectivity automatically through code (I mean, we need to refresh automatically).
I need to hardcode all the information in the Ms-Access code.
My User DSN Name: abcd
Oracle Database Name: abcd
Schema Name(User Name): abcd
password: abcd
View 1 Replies
View Related
Jun 29, 2005
I have created a database but I would like it to be an exe. is this possible? if so, how???
I would like to lock the design and the code for the database. I will be holding about 2000 entries, will this be a problem?
thanks
View 4 Replies
View Related
Jul 11, 2005
Hello Everyone,
First of all thanks alot for investing your valuable time in reading my query, I wonder if someone can kindly educate me on how to convert an access database.mdb file to an executable .exe file. Also is there a way to create an installation package to install the database to many Computers.
Thanks Again
Warm Regards,
Darno
View 3 Replies
View Related