Access97 SQL Syntax

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 Replies


ADVERTISEMENT

Access97 Problem

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

Using ACCESS97 On WindowsXP Pro OS

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

Importing *.csv Into Access97

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

Open Access97 MDE With Access2000

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

How To Connect Access97 With ExcelXP??

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

Access97 Permission Problem

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

Security Problem In Access97

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

Cannot Import From Excel To Access97

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

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 6 Replies View Related

Runtime Access97 On Thumb Drive?

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

Control.caption Access97 To A2000

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

Import Text File Into Access97 Without Index

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

Need Help With Syntax Please

Jun 28, 2005

Hi,
in the following code:

Dim dbtmp As DAO.Database
Dim tblObj As DAO.TableDef
Dim rs As DAO.Recordset
Set dbtmp = OpenDatabase("C:WINDOWSBureaudevcli.xls", False, True, "Excel 8.0;")
DoEvents
Set rs = dbtmp.OpenRecordset("select * from [DEVCLI$A1:C10]")

in the last line i would like replace DEVCLI (the Excel sheet name) by a variable to make my program works with any excel file.
What is the syntaxe for that ?
Thanks in advance for help.
VINCENT

View 2 Replies View Related

IIf Syntax

Nov 1, 2005

Think my syntax is wrong here, but not sure where. I would appreciate any help! Thanks!
SELECT a.[FA Ctr], a.[SAP Co], a.[SAP Ctr], a.[GL Co],



IIf([Len([SAP CO])] ="3",""0"' & [a].[SAP CO]", IIf([Len([SAP CO])]="2",""'00"' & [a].[SAP CO]"), IIf([Len([SAP CO])]="1",""'00"' & [a].[SAP CO]", "[A].[SAP CO]"))) AS Expr3
INTO [Interim Table]
FROM Asset_Map AS a

View 11 Replies View Related

IIF Syntax

Mar 12, 2008

Hi there

I'm trying to write a query using an IIF statement in the "Field" property of the Access Query Design Grid the new Column is called F:

there are 3 Columns, System, Etot, Itot in a mytable

Basically in English the query goes,

IF mytable.[System] = 700,
mytable.[Etot] = 0,
mytable.[Itot] = 0
then the newly created derived column
mytable.[F] "N/A"
OTHERWISE
mytable.[F] "OK"

I hope someone understands,

Batwings

View 6 Replies View Related

Syntax For LIKE

Dec 6, 2004

Hi,
I wud like to know why this syntax is not working.
select * from table_name where col_val like 'a%'

This returns the column values that start with 'a'. I was getting the result properly few days ago. But now suddenly this query doesnot give the result. When i tried this out in a website it was working there, but not in access.

Can anybody see what is wrong in this syntax? If the syntax is right where wud be the fault?

View 6 Replies View Related

Need Help With Syntax

Dec 20, 2004

Can someone tell me how to insert the contents of a variable into a table?
I am trying to add selected items from a listbox (Members) into a temporary table (tempMembers). The code is below. On debugging, it picks up the contents of the variable (iMemberID) OK, but adds "0" to the temp table (both are integers). I'm pretty sure the problem is in the Insert statement below (stSQL3), but I can't figure out how to write it!

Any help would be greatly appreciated!
Thanks

stSQL3 = "INSERT INTO tempMembers (MemberID) VALUES & iMemberID & ;"
For Each varItm In Me!Members.ItemsSelected
iMemberID = ctl.ItemData(varItm)
DoCmd.RunSQL stSQL3
Next varItm

View 6 Replies View Related

Syntax

Sep 29, 2005

Can anyone tell me the proper syntax for:

1. Calling another Form from within a Form

2. Calling a module from within a Form

Thanks in Advance

View 5 Replies View Related

Help With Syntax

Sep 4, 2006

Can someone help me on the syntax for the following?
I have two tables: one is TapeNumber and has one field (Tape_No) autonumbered PK. The other table has information about the video and uses the Tape_No as a secondary key.

I have a form to add information about videos. I have the form bound to the first table, so it adds a new TapeNumber when I add a record. I have a subform displaying the video information for that tape (there may be several videos recorded on one tape).

When I add a new tape (or video to an existing tape), how do I save the tape number to the second table?

Thanks!

View 1 Replies View Related

Vba Syntax????????help

Mar 1, 2007

have this code which keeps on giving me this error...I dont know whats wrong with the code please help tried removing the quotes (rstStudents.Open "SELECT * FROM Students WHERE Regno = " & _
txtReg , _
CurrentProject.Connection, _
adOpenStatic, adLockReadOnly, adCmdText) but then it wont retain any records even if they exist in the table

here is the original code

rstStudents.Open "SELECT * FROM Students WHERE Regno = '" & _
txtReg & "'", _
CurrentProject.Connection, _
adOpenStatic, adLockReadOnly, adCmdText




ERROR MESSAGE>>>>>>> Runtime Error '-2147217913 (80040e07)
Data type mismatch in criteria expression


the code is supposed to use number input by user to search in a table and fill all the other fields in the form with the table data (it is run on lost focus of the text box were value has been input)



the whole code :::::




Private Sub txtReg_LostFocus()
Dim rstStudents As ADODB.Recordset
Dim blnFound As Boolean
Dim fldItem As ADODB.Field

blnFound = False

If Me.txtReg = "" Then Exit Sub

Set rstStudents = New ADODB.Recordset
rstStudents.Open "SELECT * FROM Students WHERE Regno = '" & _
txtReg & "'", _
CurrentProject.Connection, _
adOpenStatic, adLockReadOnly, adCmdText

With rstStudents
While Not .EOF
For Each fldItem In .Fields
If fldItem.Name = "Regno" Then
If fldItem.Value = txtReg Then
Me.txtName = .Fields("Name")
Me.txtAdd = .Fields("Address")
Me.txttel = .Fields("Telno")
Me.txtTutor = .Fields("TutorName")
Me.txtbks = .Fields("NoBooksonloan")
blnFound = True
End If
End If
Next

.MoveNext
Wend
End With

If blnFound = False Then

MsgBox "No student record to display"
' ... and reset the form
' cmdReset_Click
End If

rstStudents.Close
Set rstStudents = Nothing

End Sub

View 2 Replies View Related

Syntax

Sep 5, 2007

I am trying to open a PDF from Access. I get it to work but it requires me to hard code the path and fiel name....

The path will always be the same although the file name will change. RIght now I get the fiel name from a textbox on a form...I am trying to change the below working code with a varaible instead of the path....I think there is some systax issues that I cannto fingure out

TotPath is the variable that holds the entire path to the file "X:Map_LibraryPark_and_Rec_AsbuiltPRA_19_73-01_W0.pdf"

This variable is rebuilt everytime the user selects something on the form....so the actual File name will change every time...

Does anyone have and ideas as to how to incorporate a variable instead of the hard coded path?

THank you all for your help.....


Code:WORKING CODE: 'Shell "C:Program FilesAdobeAcrobat 7.0AcrobatAcrobat.exe X:Map_LibraryPark_and_Rec_AsbuiltPRA_19_73-01_W0.pdf", vbMaximizedFocus ' open a txt documentNOT WORKING CODE:Shell "C:Program FilesAdobeAcrobat 7.0AcrobatAcrobat.exe TotPath", vbMaximizedFocus ' open a txt document

View 3 Replies View Related

Syntax Question

Aug 1, 2005

Hi,
In a form i use the following filter fonction :
DoCmd.ApplyFilter , "CliNom = '" & RunCli & "'"
The problem is that sometimes RunCli (wich is a name) contains ' symbol and then generates a syntaxe error, is there a way to prevent that ?
Thanks in advance.
VINCENT

View 3 Replies View Related

Syntax Error

Mar 2, 2007

On my form I have 2 radio buttons rdoAll and rdoSpecific. If rdoAll is true then it prints a report. THis part works fine. However if rdoSpecific is true then I make visable combo box to look up an ID. Then when I click the button I want the same form to open but with just the info pertaining to the ID selected. Here is my code:

Private Sub cmdLotHistory_Click()

Dim stDocName As String, stSelection As String

stDocName = "rptLotHistory"

If Me.rdoAll = True Then
DoCmd.OpenReport "rptLotHistory", acViewPreview
End If

If Me.cboLotLU.Value > 0 Then
stSelection = "[LotID] =" & Me![cboLotLU]
End If

DoCmd.OpenReport stDocName, acViewPreview, , stSelection

End Sub

When I choose the ID and click the button I get the message

Run-Time error '3075':

Syntax error (missing operator) in query expression '(LotID
=020806B1585)'.

the 020806B1585 is my ID number.

Debug hightlights the
DoCmd.OpenReport stDocName, acViewPreview, , stSelection

but I'm guessing my real problem lies in the
stSelection = "[LotID] =" & Me![cboLotLU]


Can anyone point me in the right direction?

Thanks,
Rick

View 2 Replies View Related

SQL Syntax Issue

Jun 18, 2007

I am using the folling code in a after update combobox event:

Dim rst As DAO.Recordset
Dim sqlwhere As String

sqlwhere = " "

If IsNull(Me.comboSearchSerial) = False Then
sqlwhere = "SerialNumber='" & Me.comboSearchSerial & "' and "
End If


mysql = "SELECT TBL_RMA.* from [TBL_RMA] Where "
mysql = mysql & sqlwhere
mysql = mysql & ";"
Forms!FRM_RMA.RecordSource = mysql

Exit_comboSearchSerial_AfterUpdate:

This is currently working for me with SerialNumber being a text field. I would like to use the same code substituting SerialNumber with a Date field. I know its probly an issue with the use of quotes, but I can't seem to figure it out. Also, if I wanted to use a number format, what would I use...
Thanks
Gregg

View 2 Replies View Related

INVALID SQL Syntax

Sep 13, 2007

I am receiving this error;

"Invalid SQL syntax, cannot use multiple columns in a column level CHECK constraint."

Without explaining my disaster of a situation anyone have any ideas?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved