|
-
May 31st, 2002, 10:06 PM
#1
Thread Starter
Member
Maybe another simple database question?
Rs.Open "SELECT * FROM Data WHERE Dia = '" & FindDia & "' and Hei = '" & FindHei & "'", Cn
In the above example how would i modify this so instead of finding the data where " Dia=FindDia" i want it to be able to go say 1 either side.
Example if FindDia was equal to 9 i want it to search for all data that was either 10 , 9 or 8...
-
May 31st, 2002, 10:13 PM
#2
Hyperactive Member
FindDia = 9
FindDia1=FindDia-1
FindDia2 = FindDia+1
Rs.Open "SELECT * FROM Data WHERE (Dia = '" & FindDia &
"' or Dia = "' & FindDia1 & "' or Dia = '" & FindDia2 & ") and Hei = '" & FindHei & "'", Cn
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
|