473,399 Members | 2,159 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,399 software developers and data experts.

VB6 with Access 2000

Hi Can you please help, I am new to this so please be gentle!

I have written the following code using VB6 and Access2000 and I recieve a Run-Time error '3343' unrecognized format'S:\RdiIntranet\RDiIntranet.mdb' , when running the code.

Expand|Select|Wrap|Line Numbers
  1. Public rstSuppliers As DAO.Recordset
  2. Public dbSuppliers As DAO.Database
  3.  
  4. Private Sub Form_Load()
  5.     ' ******************************** RDi Suppliers *********************************
  6.         Set dbSuppliers = OpenDatabase("S:\RdiIntranet\RdiIntranet.mdb")
  7.         Set rstSuppliers = dbSuppliers.OpenRecordset("Select * From Suppliers order by ACCOUNT_REF")
  8.         rstSuppliers.MoveFirst
  9. End Sub
I think it's because i am using Access 2000, can you please help.


Thanks
Steve
Jul 4 '07 #1
7 1787
Dököll
2,364 Expert 2GB
Hi Can you please help, I am new to this so please be gentle!

I have written the following code useing VB6 and Access2000 and i recieve a Run-Time error '3343' unrecognized format'S:\RdiIntranet\RDiIntranet.mdb' , when running the code.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Public rstSuppliers As DAO.Recordset
  3. Public dbSuppliers As DAO.Database
  4.  
  5. Private Sub Form_Load()
  6.     ' ******************************** RDi Suppliers *********************************
  7.         Set dbSuppliers = OpenDatabase("S:\RdiIntranet\RdiIntranet.mdb")
  8.         Set rstSuppliers = dbSuppliers.OpenRecordset("Select * From Suppliers order by ACCOUNT_REF")
  9.         rstSuppliers.MoveFirst
  10. End Sub      
  11.  
  12.  
I think it's because i am using Access 2000, can you please help.


Thanks
Steve
Have you tried using Ado, callsupport1!

I am going to see about an example in DAO. I am almost certain something like this is possible through Ado.

I also run two 2000 I don't seem to have any problems.

In a bit!
Jul 4 '07 #2
Dököll
2,364 Expert 2GB
I think we can work with this one, I have it linked to one of my databases on C, fired right away, pretty easy code. You'll need to do all the work, a little digging you'll figure it out:
Add this in Form_Load
Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Form_Load()
  3. Dim my_database As Database    'dimension database as database
  4. Dim my_record As Recordset
  5. Dim test As String
  6. Text1(0).Text = "123456*" my user ids all start at 123456
  7. test = Text1(0).Text
  8. Set my_database = OpenDatabase("C:\Data_Central.mdb")   'this function will open the database using the link to the access database (besure database is closed)
  9. Set my_record = my_database.OpenRecordset("select * from Employee where UserID like '" & Text1(0).Text & "'")    'search by UserID, only if data already exist
  10.    Do While Not my_record.EOF  'this function will keep searching for fields matching each textbox
  11.  
  12.         Text1(0).Text = my_record.Fields("UserID")
  13.         Text1(1).Text = my_record.Fields("EmployeeID")
  14.         Text1(2).Text = my_record.Fields("TodayDate")
  15.  
  16.         '... and so on
  17.  
  18.         my_record.MoveNext
  19.    Loop
  20.    my_database.Close
  21. End Sub
  22.  
  23.  
It's a little clumsy but it should get you started. It is also in DAO, you'll need to reference Microsoft DAO 3.6 Object Library.

I would also load Adodc control to page through the data loading in your textboxes, 1234567, 1234568, 1234569 and so on.

Let us know how you make out...
Jul 4 '07 #3
Killer42
8,435 Expert 8TB
...unrecognized format'S:\RdiIntranet\RDiIntranet.mdb'
I wonder whether this might indicate that the MDB file was created by either an older or a newer version of Access than what your system can handle.
Jul 5 '07 #4
Esmael
58
Hi Can you please help, I am new to this so please be gentle!

I have written the following code using VB6 and Access2000 and I recieve a Run-Time error '3343' unrecognized format'S:\RdiIntranet\RDiIntranet.mdb' , when running the code.

Expand|Select|Wrap|Line Numbers
  1. Public rstSuppliers As DAO.Recordset
  2. Public dbSuppliers As DAO.Database
  3.  
  4. Private Sub Form_Load()
  5.     ' ******************************** RDi Suppliers *********************************
  6.         Set dbSuppliers = OpenDatabase("S:\RdiIntranet\RdiIntranet.mdb")
  7.         Set rstSuppliers = dbSuppliers.OpenRecordset("Select * From Suppliers order by ACCOUNT_REF")
  8.         rstSuppliers.MoveFirst
  9. End Sub
I think it's because i am using Access 2000, can you please help.


Thanks
Steve

Hi Callsupport1....


Yeah... i also encountered that problem when am starting on VB...
Your idea is correct... its because of the MS Access version.

You dont have to do anything more on your given codes... all you have to do is to changed your referenced:


If you are referencing to
Microsoft DAO 3.5 Object library

changed to:
Microsoft DAO 3.6 Object library


I hope this one will works on you....
(besides maybe you dont need control like datacontrol for this... because you
might have included it to your given source code if it is so...)



Good Luck!
Jul 5 '07 #5
Hi Callsupport1....


Yeah... i also encountered that problem when am starting on VB...
Your idea is correct... its because of the MS Access version.

You dont have to do anything more on your given codes... all you have to do is to changed your referenced:


If you are referencing to
Microsoft DAO 3.5 Object library

changed to:
Microsoft DAO 3.6 Object library


I hope this one will works on you....
(besides maybe you dont need control like datacontrol for this... because you
might have included it to your given source code if it is so...)



Good Luck!
Hi Thanks for the reply, I am new to VB6 and am not sure how to reference Microsoft DAO 3.5 Object library in my code.

Regards
Steve
Jul 5 '07 #6
Killer42
8,435 Expert 8TB
Hi Thanks for the reply, I am new to VB6 and am not sure how to reference Microsoft DAO 3.5 Object library in my code.
Pull down Project menu, select References, then hit the checkbox next to the desired reference, and click OK.
Jul 5 '07 #7
Hi Killer,
In the below VB code I want to input "password" in encripted format using InputBox, please help me in this regard

Expand|Select|Wrap|Line Numbers
  1. Dim Pwd As String = String.Empty
  2.         Dim Obj As Object
  3.         Pwd = InputBox("Enter the password", "Security")
  4.         If Pwd = "Password" Then
  5.             Dim oSettings As New Settings
  6.             oSettings.ShowDialog()
  7.             LoadXml()
  8.         ElseIf Pwd = "" Then
  9.         Else
  10.             MessageCall("Inavalid password", MessageBoxButtons.OK)
  11.         End If
Jul 27 '07 #8

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

Similar topics

17
by: chicha | last post by:
Hey people, I have to convert MS Access 2000 database into mysql database, the whole thing being part of this project I'm doing for one of my faculty classes. My professor somehow presumed I...
2
by: Scott | last post by:
Any help would be grateful :-) Problem: When I test my installation of Access 2000 MDE, I get the following error: "Unrecognised Format".. This means that Access 97 cannot read Access 2000. ...
3
by: Pat | last post by:
We have a database with Access 97 as the front-end and SQL7 as the back end. It is on a network server and accessed by joining a MS Access Workgroup. We are trying to add a new user and have...
3
by: Scott | last post by:
Hi, If we want to compile an Access 2002 database and distribute it to others, will the compiled software run on any PC, like Windows 98, Windows 2000, etc. Also, you don't have to have...
6
by: Serious_Practitioner | last post by:
....or lack thereof... I use Access 2000 which I own as part of Office 2000 Professional. I've had enough trouble with glitches to ask if these are common occurrences - 1. Sometimes the "Help"...
2
by: Jeff | last post by:
Does anyone know of any potential problems running a 2000 database with 2003? Also, what about installing all other Office products as 2003 versions but leaving Access as 2002 running a 2000...
47
by: ship | last post by:
Hi We need some advice: We are thinking of upgrading our Access database from Access 2000 to Access 2004. How stable is MS Office 2003? (particularly Access 2003). We are just a small...
0
by: com | last post by:
MS Access 2000 Password Recoverer 4.2 Screenshot - Soft30.com MS Access 2000 Password Recoverer will display the password to a MS Access database (*.mdb). This program works for MS Access files...
5
by: Mo | last post by:
Hello all, I'm trying to set up an access 2000 .adp project connecting to a SQL server 2005 database. I can set up the connection ok, but once I have completed the setup process, I get the...
3
by: NEWSGROUPS | last post by:
I am in the midst of trying to convert about 25 Access 2000 to Access 2003. The new environment consists of Office/Access 2003 and Outlook 2003. When converting the back ends I have no problems....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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
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
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.