G
Guest
My data contains PIN numbers where by some start with numbers e.g., 001 while
others start with letters e.g., PIN.
I have a form that will open that will open the report but its not opening
it right. I would like to open the report using either of the following
conditions
1. All
2. Only PIN numbers that start with numbers
3. only PIN numbers that start with letters PIN
This is how my code looks like:
If Me.ListPINS.Column(0) = "<All PINS >" Then
DoCmd.OpenReport strDocName, acViewPreview
ElseIf Me.ListPINS.Column(0) = "<Number PINS>" Then
DoCmd.OpenReport strDocName, acViewPreview, , "left([PINNUM],3)" <> "PIN"
ElseIf Me.ListPINS.Column(0) = "<Letter PINS>" Then
DoCmd.OpenReport strDocName, acViewPreview, , "Left(PINNUM, 3)" ="PIN"
End IF
Please Help!
others start with letters e.g., PIN.
I have a form that will open that will open the report but its not opening
it right. I would like to open the report using either of the following
conditions
1. All
2. Only PIN numbers that start with numbers
3. only PIN numbers that start with letters PIN
This is how my code looks like:
If Me.ListPINS.Column(0) = "<All PINS >" Then
DoCmd.OpenReport strDocName, acViewPreview
ElseIf Me.ListPINS.Column(0) = "<Number PINS>" Then
DoCmd.OpenReport strDocName, acViewPreview, , "left([PINNUM],3)" <> "PIN"
ElseIf Me.ListPINS.Column(0) = "<Letter PINS>" Then
DoCmd.OpenReport strDocName, acViewPreview, , "Left(PINNUM, 3)" ="PIN"
End IF
Please Help!