English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm stuck on this one and google isn't helping.

Trying to validate data entry using a query in access but running through ADO. It all runs fine until it tries to validate an id number like this:

VAL_member_id: IIf([member_id]<>"" And ([member_id] Like "____-_____" Or [member_id] Like "#-#" Or [member_id] Like "#-##" Or [member_id] Like "#-###" Or [member_id] Like "#-####" Or [member_id] Like "#-#####" Or [member_id] Like "#-######" Or [member_id] Like "#-#######"),True,False)

When it runs in Access it comes up True but when it's run through the ADO/ODBC driver it comes up False. I can't see a problem with it though.

It's probably gonna be something simple. xD

2006-08-17 06:00:14 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

Have you tried to use single quotes, because when you run to ODBC it comes often to a wrong evaluation using double quotes.
I hope it will help you

Helmut

2006-08-17 09:00:29 · answer #1 · answered by hswes 2 · 0 0

substring the member_id and use the isNumeric on both pieces.

2006-08-17 13:08:28 · answer #2 · answered by Anonymous · 0 0

the first step is to find a forum where people actually know what you're talking about. Many of the answers you'll get here are of the "heck, I dunno either" sort, and that's when you're asking questions like, "What is a Server?"

2006-08-17 13:08:14 · answer #3 · answered by pianoplayerontheroof 3 · 0 0

fedest.com, questions and answers