Is a cloned recordset still a clone if it closed then opened to use?

G

George Hester

In other words if I close a cloned recordset then open it so that I can use
it, is it still a Clone?
Thanks
 
B

boblarson

How would you reopen a cloned recordset? It is a clone of the main
recordset, so when the clone is closed it ceases to be. The only way to
"reopen" a clone would be to set the recordset to be the clone of the
exisiting recordset.

Your question has me somewhat baffled as to what the reasoning for this
would be anyway. Can you share the reasoning and your desired outcomes?

--
Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________
 
G

George Hester

Yes I am using the Open method with an SQL statement. The recordset I will
be cloning from is open obviously and so is the clone. So when I make the
clone like this

Set rt = .MSODSC.DefaultRecordset
rtCln = rt.Clone

you can see the clone is open but that is not what I can use. So I close it
rtCln.Close
Then
rtCln.Open SQL, MSODSC.Connection

If I don't do this and just go to the above statement directly from making
the Clone I do not get what I need otherwise I do. So I asked.
 
G

George Hester

Hi let me give some more of what I am trying to do. The database is just a
listing of books and their authors. There is a dropdownlist0 which displays
titles and another dropdownlist1 which displays authors for those titles.
Almost all the title listings are unique but not the authors. Some authors
have many titles. I found when I was selecting a author by the dropdownlist1
that the dropdown would arrive at the author name first in the list although
the title dropdownlist0 would show the correct title for the selected author
placement. Here is an example

Henry Adams Democracy
Henry Adams Esther

The dropdownlist1 will show two Henry Adams'
while the dropdownlist0 will show Democracy and Esther.

I have gotten it so that when the second Henry Adams is selected Esther will
show in dropdownlist0. Well that is what I want. But after dropdownlst1 is
selected, it reverts to the first Henry Adams in the list which is wrong.
This presents a problem. For after selecting the second Henry Adams in the
list to get Esther you cannot select the first Henry Adams in the list to
get Democracy. The dropdownlist1 is already at that location so selecting it
does nothing.
The fix for that is the ultimate goal.

I have been able to go to the exact record I want but dropdownlist1 does NOT
arrive there. It always arrives at the first of a multiple identical
listing. This shows one of the deficiencies of the Find method (cannot use
two criteria but even then I doubt that would change anything) so I've
chucked it and found another way at arriving at the record I want.
 
C

Cheese_whiz

Hi George,

Looks like you need some work on your design to me. It shouldn't be that
you have the same author's name in a drop down list (combo box) more than
once. How would anyone know which to choose?

I suspect you have used just one table to store all your records (including
data on both books and authors) like you might do in a spreadsheet. What you
need is THREE tables in this case. You need a 'books' table, an 'authors'
table, and a 'junction' table because the relationship between books and
authors is said to be 'many-to-many'. When you have a 'many-to-many'
relationship, you need a third table to resolve it. That third table holds,
at minimum, the primary keys of the original two tables. Then each of the
original tables is related to the junction table (one-to-many).

Is that the way you've set up your tables?

Hope that helps. I don't fully understand what you are describing so if
I've strayed off the path, my apologies.

CW
 
G

George Hester

No actually you have provided another way of doing what I want. In fact what
I provided for you is just a skeleton of what I currently have. To address
the issue I am having there are probably two or more answers. One is yours
and I will probably do what you suggest once I have the mechanics of the
coding practiced. The other is the dropdownlist1 at hand. I believe this
issue is just a HTML component issue. I don't think there is a solution to
this issue for the following reason. I have assigned the .Value for
dropdownlst1 to the exact record I want. Still reverts to the first in the
list after one of the identicle listings are selected. That tells me it is
an HTML issue not a Access 2000 issue. So you see your answer is actually
the only one that has a chance of success and I like it. The reason why I am
using just one taable is because in a DAP things get very hairy when more
than one table is used in the DAP. Is one reason I spz why DAP was a dead
end. I can do it but it's not pretty. Thanks Cheese.
 
C

Cheese_whiz

Glad to have been of some help. Good luck!

CW

George Hester said:
No actually you have provided another way of doing what I want. In fact what
I provided for you is just a skeleton of what I currently have. To address
the issue I am having there are probably two or more answers. One is yours
and I will probably do what you suggest once I have the mechanics of the
coding practiced. The other is the dropdownlist1 at hand. I believe this
issue is just a HTML component issue. I don't think there is a solution to
this issue for the following reason. I have assigned the .Value for
dropdownlst1 to the exact record I want. Still reverts to the first in the
list after one of the identicle listings are selected. That tells me it is
an HTML issue not a Access 2000 issue. So you see your answer is actually
the only one that has a chance of success and I like it. The reason why I am
using just one taable is because in a DAP things get very hairy when more
than one table is used in the DAP. Is one reason I spz why DAP was a dead
end. I can do it but it's not pretty. Thanks Cheese.
 
G

George Hester

I was just thinking. One way to fool the dropdownlist1 is by removing all
its options except the current one before display. Then the nect time the
dropdown is used is to put them all back in the list.
 
Top