NeoPa, thanks for your suggestions
Your first is quite creative :) (There's a typo in that the joining should be on the ID-fields, btw)
The second one unfortunately doesnt work (even after reversing the WHERE and GROUP BY lines), as it lists all records with the same (highest) priority of a contact, not just one: if a contact has 2 emailaddresses both with prio=10 then both will show up in the final result.
...
User Profile
Collapse
-
SQL id of record at which maximum occurs, by group
Hey all,
I have a question that ought to be simple but has given me headaches for a while.
I have a table with contact email addresses, say.
Code:T ID ContID Priority Emailaddress ---------------------------------------------- 1 1 10 email1@contact1.fi 2 1 7 email2@contact1.fi 3 2 9 email1@contact2.fi 4 2 8
-
Alright people,
I understand now. This is what happened.
On the parent form, there is the public recordset object 'rst'. Then, also on the parent form, there is a number of functions that retrieve data from this recordset, or from another recordset if specified. In code:
Code:Public Function varCharacteristic(byval lngField as Long, Optional ByVal varID As Variant) As Variant 'Get a Field value.
Leave a comment:
-
@ Fishval,
I have created a small db (1 table, 1 container form, 2 sub forms) from scratch, and the problem seems to not appear....
I will now try to cut pieces out of the the larger db that I have the problems with, to the point where it does work, to see where the problem lies.
Thanks for your help sofar!
@ADezii,
True; rsttemp is a local object...Leave a comment:
-
Fishval, thanks for replying. I'll post a sample db asap - just give me about 8 to 9 hrs to go to work and come back home :)Leave a comment:
-
setting public objects of parent form
Hey guys (m/f),
I've got a problem that's been having me pulling out hairs and losing sleep quite some time now.
The thing is this. I have a container form with a subform control. This control can take several sub forms as its source object. To make the information, that is generated on one sub form, available to a later sub form, I'm trying to store data in public variables and objects of the container form.
...
No activity results to display
Show More
Leave a comment: