Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to compare variables of variant type? 1

Status
Not open for further replies.

LuRSH

Programmer
Aug 2, 2001
63
US
Hi Folks!

Seams to be simple but I really don't know how.

I have two bookmarks form two different records (same query, in the same form) and I want to know if they are actualy the same bookmark.

I keep both bookmarks in Variable of Variant type.

The problem is when I try to compare my Variable with a record bookmark or I try to compare my variable I receive Type Mismatch message??!!!?!!?

The code is like:

IF mvarRecord1Bookmark <> me.bookmark Then
.....


or

If mvarRecord1Bookmark <> varRecord2Bookmark Then
....

WHY???? How to do that???


Thanks and sorry for the lack of knowledge...
 
I just looked up Bookmark in the help and the following line is in the description:

You can use the StrComp function to compare a Variant or string variable to a bookmark, or when comparing a bookmark against a bookmark.

Hope that helps... Terry M. Hoey
 
Thx Terry! Just what I needed!

I looked in the help but didn't find it. Problably looking in the wrong place...

Thx Again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top