HOVER TECHNIQUE

  • Thread starter Thread starter VERO
  • Start date Start date
V

VERO

HI! I'M NEW HERE.

I'VE BEEN TRYING LIKE CRAZY TO CONDITIONALLY FORMAT WITH A
HOVER TECHNIQUE SOME POPUP FORMS THAT OPEN FROM CUSTOM
SEARCH FUNCTIONS. SO, IF WE SEARCH FOR CLIENTS OR
CONTACTS I GET THE POP UP WITH A FILTERED RECORDSOURCE.
SO I FOUND LEBANS SITE AND SAMPLE DATABASE WITH THE HOVER
TECHNIQUE, WHICH WORK, BUT ONLY IF THE ROWNUMBER IS THE
EXACT SAME AS THE CURRENTRECORD. SO, IN MY CASE EACH
CLIENT HAS A UNIQUE CUSTOMER ID, WHICH ISN'T IN ANY
ORDER. WHEN THIS RECORDSOURCE IS FILTERED, I COULD HAVE
ROWNUMBER 1, 1200, 100, 300, ETC. DOES ANYONE KNOW OF A
MORE GENERIC WAY OF USING THE ROWNUMBER, OR GETCURRENTROW
FUNCTION SO THAT IT EQUALS THE CUSTOMER ID INSTEAD?
 
It is not quite clear what you mean by "hover" technique.

Also, it is not clear at all what the problem is with the currentreocrd
problem.?

For displaying a list of results on a screen, here is some screen shots of
ms-access grids that shows "results"

http://www.attcanada.net/~kallal.msn/Articles/Grid.htm

And, if you are talking about searching for names...the above grid ideas can
be used for searching. Here is some notes on how this could work:

http://www.attcanada.net/~kallal.msn/Search/index.html

Also...it is considered rude to post in upper case, as THAT IS CONSIDERED
SHOUTING AND VERY LOUD on your part.

Anyway...take a look at the above screen shots..and then feel free to
clarify what you mean by the current record problem..as it is not clear to
me what you are saying.
 
Oh, my apologies to everyone if this is what they
thought. It is a habit of mine to type in uppercase. It
was not meant to insinuate that I was shouting, and I
definitely didn't mean to be rude. So, again I apologize.

So, what I mean by "hover", is the highlighting of the
currentrow (currentrecord) when it has the focus. An
OnMouseMove () event. The way Leban has it set up is that
each row in the table has an autonumber field
named "Rownumber". So, say you are the first contact
record entered, your "Rownumber" will be 1. This way the
currentrecord works. But if I query a recordsource, the
currentrecord may be row#1 in the filtered source, but
my "Rownumber" field is a number 12. It also disrupts the
code if a contact is deleted.
 
Oh, my apologies to everyone if this is what they
thought. It is a habit of mine to type in uppercase. It
was not meant to insinuate that I was shouting, and I
definitely didn't mean to be rude. So, again I apologize.

You are most welcome. Not a big deal that you did type in upper case. Funny
how just typing on a keyboard can kind of convey things.
named "Rownumber". So, say you are the first contact
record entered, your "Rownumber" will be 1. This way the
currentrecord works. But if I query a recordsource, the
currentrecord may be row#1 in the filtered source, but
my "Rownumber" field is a number 12. It also disrupts the
code if a contact is deleted.

If you query a reocrdsouce..you want to always use the key id of the record
(not some position). Note that you DO NOT have to include those additional
fields on the form (but, that key id field MUST however be part of the
query, or in the table that the form is attached to).

So, you can grab the key id, and use that for your query.

dim strSql as string
dim rstRec as dao.recordset

strSql = select CustomerName from tblCustomers where id = " & me.Id

set rstRec = currentdb.OpenRecordSet(strSql)

msgbox "customer name of id is " & rstRec!CustomerName

The above would display a customer name based on the ID, but NOT the
position in the list. Thus, deletions etc. should not mix things up.
 
Yes it is true. Many actions you deem as ordinary can
convey things that you really don't mean. It is kind of
funny. Thank you for responding and helping!
 
Back
Top