-----Original Message-----
How about:
Select Case IDParam
Case "1","2","3","n1"
[Value].Visible = True
[Unit].Visible = True
[Veloc].Visible = False
Case "4","5","6","n2"
[Value].Visible = False
[Unit].Visible = False
[Veloc].Visible = True
Case Else
'What to do if it is something other than those?
End Select
Chris Nebinger
-----Original Message-----
Sorry.
I have a F_Form with:
Private Sub Form_Current()
If [IdParam] IN ("1", "2", "3", "n1") Then
[Value].Visible = True
[Unit].Visible = True
[Veloc].Visible = False
Else
[IdParam] IN ("4", "5", "n2") Then
[Value].Visible = False
[Unit].Visible = False
[Veloc].Visible = True
End if
End Sub
Thanks
an
-----Original Message-----
You didn't say that you had that in an IF statement!
Perhaps you'd better
step back and show more of your code.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
message
Thanks for you reply.
When I changed to
If [IdParam] In ("1", "2", "6") then
Appear the msg
Compile error:
Expected: Then or GoTo
Why?
Many Thanks.
an
-----Original Message-----
You could use IN to replace some (if not all) of your
OR
conditions.
[IdParam] IN ("1", "6", "n")
is the same as
[IdParam]="1" Or [IdParam]="6" Or ... [IdParam]="n"
On the other hand, if you're building this SQL in
code,
using something
like:
strSQL = "SELECT ..." & _
"FROM ..." & _
"WHERE ..." & _
"OR ..." & _
etc.
You can always break it into smaller sections:
strSQL = "SELECT ..." & _
"FROM ..."
strSQL = strSQL & "WHERE ..." & _
"OR ..." & _
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
message
I need to refer about 200 conditions with OR
operator in
code to, hide or show, Text boxes.
When I try it, with
[IdParam]="1" Or [IdParam]="6" Or ... [IdParam] ="n"
appear the next message error:
"Too many line continuation"
How is possible to pass this situation, please.
Thanks in advance.
an
.
.
.
.