Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Comparing sql record to cell value


I am assigning a value to a variable from an oracle query using 0040
and a dynaset.

Eg For i = 1 To OraDynaSet.RecordCount
dbValue = OraDynaSet.Fields(0).Value
............................ bla bla


I am then trying to compare this variable with some value in a range
and am getting in all sorts of a mess with Exit For, End If :)

What I am trying to do is getting first record and compare to every
value in my range eg Range("A1:A3"). If it find a value then good and
we move onto next record. If it does not find a matching value then up
pops a msgbox and procedure stops. If all records from query are
matched in the range then naturally it also stops or does something
else without any problems


Thanks


--
mozart
------------------------------------------------------------------------
mozart's Profile: http://www.excelforum.com/member.php...o&userid=13314
View this thread: http://www.excelforum.com/showthread...hreadid=377019

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Comparing sql record to cell value


if not (WorksheetFunction.Match(dbValue,range("A1:A3"),0) 0) then
msgbox "your message here"
exit sub
end if


Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=37701

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open new record with selected fields from previous record Design by Sue Excel Discussion (Misc queries) 1 June 12th 09 02:24 PM
Set cell to record date when adjacent cell is filled AND NOT RESET The new guy Excel Worksheet Functions 3 February 26th 07 06:11 PM
how do i record changing cell data (cell is dde linked) Morph Excel Discussion (Misc queries) 1 September 22nd 05 12:28 AM
Record Macro - Record custom user actions Sal[_4_] Excel Programming 1 December 23rd 04 03:18 PM
Need help autopopulating next new record with previous record data Harry S[_3_] Excel Programming 2 October 1st 03 10:59 PM


All times are GMT +1. The time now is 08:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"