Trouble after saving to previous version

Chimp8471

Registered User.
Local time
Today, 02:19
Joined
Mar 18, 2003
Messages
353
i have been working on this project all week and now it is almost ready to use i am having problems after saving the file to a previous version..

it was designed in Access 2K i need this in access 97, so i saved it as a prior version of Access and opened it and debugged it and saved the modules, but now when i run it i get a message appear saying,

The action or method requires a query name argument

you tried to open the use openquery action or method, but you left the name argument blank, in th equery name argument, enter a query name.


what is this meaning please ? my code is below

Code:
Option Compare Database
Option Explicit


Private Sub DisplaySection_AfterUpdate()
    Select Case DisplaySection
        Case 1
            Me.ByMachine.Visible = True
            Me.ByEventcode.Visible = False
        Case 2
            Me.ByEventcode.Visible = True
            Me.ByMachine.Visible = False
    End Select
End Sub
Private Sub cmdRunQuery_Click()
    On Error GoTo Err_cmdRunQuery_Click
    DoCmd.SetWarnings False
    DoCmd.OpenQuery ("qEventcodeanalysis")
    DoCmd.SetWarnings True
    Select Case Me.DisplaySection
        Case 1
            DoCmd.OpenQuery Me.ByMachine.Column(1), , acReadOnly
        Case 2
            DoCmd.OpenQuery Me.ByEventcode.Column(1), , acReadOnly
    End Select
Exit_cmdRunQuery_Click:
    Exit Sub

Err_cmdRunQuery_Click:
    MsgBox Err.Description
    Resume Exit_cmdRunQuery_Click
End Sub

Private Sub DisplaySection_Enter()
    If (Len(cboDaycodeStart & vbNullString) = 0) Or (Len(cboDaycodeEnd & vbNullString) = 0) Or (Len(Line & vbNullString) = 0) Then
        If (Len(cboDaycodeStart & vbNullString) = 0) Or (Len(cboDaycodeEnd & vbNullString) = 0) Then
            MsgBox "Please enter start and end Daycodes"
            If (Len(cboDaycodeStart & vbNullString) = 0) Then
                Me.cboDaycodeStart.SetFocus
                Exit Sub
            ElseIf (Len(cboDaycodeEnd & vbNullString) = 0) Then
                Me.cboDaycodeEnd.SetFocus
                Exit Sub
            End If
        End If
        If Len(Line & vbNullString) = 0 Then
            MsgBox "Please select a line"
            Me.Line.SetFocus
        End If
    End If
End Sub


Private Sub cmdClose_Click()
    On Error GoTo Err_cmdClose_Click


    DoCmd.Close

Exit_cmdClose_Click:
    Exit Sub

Err_cmdClose_Click:
    MsgBox Err.Description
    Resume Exit_cmdClose_Click

End Sub
 
Last edited:
the problem is with your Case statements ... how your computer can choose when to use Case 1 or Case 2 ... you need to place a condition there.
 
i have no idea what you mean, any chance of elaborating on this please, it worked fine in Access 2K, but has to be in 97.

I will attach my DB for you to see.
 

Attachments

Users who are viewing this thread

Back
Top Bottom