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

access 2000 and access 2002

hi all

i have this short source code:
---
Dim varElem As Variant
Dim strSQL As String
Dim i As Integer
Dim frm As Form

Set dbs = CurrentDb

On Error GoTo Do_Nothing
DoCmd.Close acQuery, "Auswahl", acSaveNo
dbs.QueryDefs.Delete "Auswahl"
Do_Nothing:

i = 0
If Liste_Auswahl.ItemsSelected.Count = 0 Then
Else
strSQL = "SELECT"
For Each varElem In Liste_Auswahl.ItemsSelected
i = i + 1
strSQL = strSQL & " ["
strSQL = strSQL & Liste_Auswahl.ItemData(varElem) & "]"
If i < Liste_Auswahl.ItemsSelected.Count Then
strSQL = strSQL & ","
End If
Next varElem
strSQL = strSQL & " FROM FLR;"

Set qdf = dbs.CreateQueryDef("Auswahl", strSQL)

DoCmd.OpenQuery "Auswahl", acViewNormal, acReadOnly
Me.Visible = False
---

It is written using version 2000 of ms access. so i wanted to give the
whole database including this code to somebody who uses version 2002 of
ms access. in version 2002 the code doesn't function cause of a
compiling error. i think that probably one of the key words (commands)
used in the code was not found by the version 2002...

Does somebody have an idee what i should write in another way.

Thnx
Peter

Nov 12 '05 #1
1 1950
Most likely a references issue.

Open a code window in A2002.
Choose References from the Tools menu.
Check the box beside:
Microsoft DAO 3.6

More info:
http://allenbrowne.com/ser-38.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"P.Pfister" <pp******@access.unizh.ch> wrote in message
news:3F**************@access.unizh.ch...
hi all

i have this short source code:
---
Dim varElem As Variant
Dim strSQL As String
Dim i As Integer
Dim frm As Form

Set dbs = CurrentDb

On Error GoTo Do_Nothing
DoCmd.Close acQuery, "Auswahl", acSaveNo
dbs.QueryDefs.Delete "Auswahl"
Do_Nothing:

i = 0
If Liste_Auswahl.ItemsSelected.Count = 0 Then
Else
strSQL = "SELECT"
For Each varElem In Liste_Auswahl.ItemsSelected
i = i + 1
strSQL = strSQL & " ["
strSQL = strSQL & Liste_Auswahl.ItemData(varElem) & "]"
If i < Liste_Auswahl.ItemsSelected.Count Then
strSQL = strSQL & ","
End If
Next varElem
strSQL = strSQL & " FROM FLR;"

Set qdf = dbs.CreateQueryDef("Auswahl", strSQL)

DoCmd.OpenQuery "Auswahl", acViewNormal, acReadOnly
Me.Visible = False
---

It is written using version 2000 of ms access. so i wanted to give the
whole database including this code to somebody who uses version 2002 of
ms access. in version 2002 the code doesn't function cause of a
compiling error. i think that probably one of the key words (commands)
used in the code was not found by the version 2002...

Does somebody have an idee what i should write in another way.

Thnx
Peter

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

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...
3
by: Stickleback | last post by:
Morning All I have been developing and deploying with Office 2000 for about 3 years, mainly Access based programs and although I have gotten used to it's quirks, I am starting to feel that I...
3
by: Stickleback | last post by:
Morning All I have been developing and deploying with Office 2000 for about 3 years, mainly Access based programs and although I have gotten used to it's quirks, I am starting to feel that I...
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...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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...
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
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...

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.