determining which record is active in a separate form

  • Thread starter Thread starter apedersen
  • Start date Start date
A

apedersen

Hello,

Here's what I'm trying to do.

I've got a flat-table database - BridgeTranscript - into which I'm
transcribing the footage I'm shooting for a documentary.

I've got a nice continuous-list form - Bridge Search - through which I
can enter search terms for each of Bridge Transcript's eight fields.

I've also got a button on each of the records which Bridge Search turns
up that, when clicked, writes that particular row into a second table,
Sequence, and spawns a second form - SequenceForm - that displays
everything in Sequence.

Everything works to this point. But I'd like to take it a step or two
farther.

Essentially, I want to be able to gather the best clips from Bridge
Search (each row is a clip) in Sequence and then rearrange them into
the editing order.

I know that databases don't naturally place data in any sort of order,
and I'm trying to figure out how to impose my own order on the data in
sequence. Using the Primary Key from Bridge Search won't work, because
I want to rearrange them. So I've set up an extra field in Sequence
called sortkey.

My first big stumbling block, though, is this:

I'd like to be able to select a record in SequenceForm so that when I
hit the write button on Bridge Search, it will write the record
immediately below the selected record.

Thing is, I can't figure out how Bridge Search can figure out which row
has been selected in SequenceForm, and what its sortkey value is. I've
tried a

I think that once I've cracked this, I can muddle my way through the
coding that will then update all the sortkey values in SequenceForm so
I can keep control of the order in which they're displayed.

Thanks in advance for any help.

-Andy
 
I suggest for your sequence field (sortkey) to use a text field with numbers
as the initial sort basis. Start with your number like 1000 (I do not know
if you will have more than 100 records, both active and in-active).
To maintain your sequence have the added record use the same sequence number
with an alpha suffix – 1001a. This will maintain your order.

Periodically your need to do maintenance on the sequence numbers to
straighten them out. Backup the database. At that time you can copy the
table structure to another table and add an autonumber field. Append the
sorted to the temp table. Delete the records in the sequence table. Append
the records from the temp table back into the sequence table and use the
autonumber as the current sequence.
 
Thanks for the suggestion, Karl. It makes a lot of sense, and that's
how I'll do it.

But I still need help. I can't figure out what code I need to put into
the Bridge Search to find out what the active record is in the
SequenceForm is.

Since it's the Bridge Search form that actually writes the record into
the Sequence table, I'd also like the Bridge Search to be able to
figure out the active record in the SequenceForm is so that it can
write the latest record into the proper spot.

I'm assuming that it's dlookup, but haven't had any success getting it
to work. Not sure if I'm barking up the wrong tree altogether, or if I
just can't get the syntax right.

Any suggestions?
 
Back
Top