M
Martin
Hello,
I have a drop down list that when clicked on I want to be able to see if the
user has asked for a pop up form to be shown again or not. the code is as
follows:
Private Sub LongDescription_Click()
Dim SQL As String, dbs As Database, rs As Recordset
Set dbs = CurrentDb
SQL = "SELECT [Form Name], ShowAgain.Status FROM ShowAgain WHERE
(((ShowAgain.[Form Name])='MessageTransactions'))"
Set rs = dbs.OpenRecordset(SQL, dbOpenDynaset)
Select Case rs.[Status]
Case Is = No
Case Is = Yes
If [Form_Reports Menu].LongDescription <> "(All)" Then
DoCmd.OpenForm "MessageTransactions", acNormal
End If
End Select
End Sub
The problem is that in the select case statement I can't seem to refer to
the field "Status" in the SQL. However when I copy the SQL to a query the
SQL works fine and the field "Status" is there.
Can anyone help with making this work properly?
Thank you in advance.
Martin
I have a drop down list that when clicked on I want to be able to see if the
user has asked for a pop up form to be shown again or not. the code is as
follows:
Private Sub LongDescription_Click()
Dim SQL As String, dbs As Database, rs As Recordset
Set dbs = CurrentDb
SQL = "SELECT [Form Name], ShowAgain.Status FROM ShowAgain WHERE
(((ShowAgain.[Form Name])='MessageTransactions'))"
Set rs = dbs.OpenRecordset(SQL, dbOpenDynaset)
Select Case rs.[Status]
Case Is = No
Case Is = Yes
If [Form_Reports Menu].LongDescription <> "(All)" Then
DoCmd.OpenForm "MessageTransactions", acNormal
End If
End Select
End Sub
The problem is that in the select case statement I can't seem to refer to
the field "Status" in the SQL. However when I copy the SQL to a query the
SQL works fine and the field "Status" is there.
Can anyone help with making this work properly?
Thank you in advance.
Martin