|
-
Oct 31st, 1999, 12:00 PM
#1
Thread Starter
Member
Hi guys, I face a small problem. How do i tell the computer to capture to accept anything that start with a 1xxxx in access? Can i use the format ?? Thks.
e.g.
With Adodc1
.Recordset.MoveFirst
While (Not .Recordset.EOF)
If Text9.Text = 1xxxx Then
.Recordset.UpdateBatch
.Recordset!ty = Val(Text10.Text)
.Recordset.Update
.Recordset.MoveNext
Adodc2.Recordset.MoveNext
Else
....
-
Oct 31st, 1999, 12:55 PM
#2
Frenzied Member
In a SQL statement, you could use "like" instead of equal. The wildcard character can vary from SQL implementation to implemantation but ANSI SQL uses "%".
so your "where" condition would be *like*:
'where sql_field like "1%"'
-
Nov 1st, 1999, 01:15 AM
#3
Frenzied Member
And for single character wildcards;
ANSI = "_"
Access = "?"
-
Nov 1st, 1999, 12:23 PM
#4
Guru
In Access you want to use a * instead of a % for your wildcard character.
Select * from MyTable where MyField like 'ValueHere*'
HTH
Tom
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|