Current Record Count, Previous Record #, Add New Record

G

Guest

I have a form with sub form for data entry. Linked together by master &
child primary key using combination of 2 fields for primary key. These
fields and values example are "CASE_YEAR" and value of 2004 and CASE_NUM and
value of 100, final key is 2004100. Field SEQ_NUM is added to secondary
table to differentiate between mutiple secondary records matching 1 primary
table record.

Primary table name is TST_FR_CASE_RECORDS
Secondary table name is TST_FR_CASE_OTHERS

Entry program works fine. But I have a problem sequencing numbers for these
tables when in UPDATE mode. User enters CASE number in form, table is
searched for match, when match found, is displayed in DATA ENTRY Mode = NO
form.

I want the user to be able to scroll with scroll arrows in record navigation
bar to
previous and next records, but at the same time to have current record show
on sub form along with an unbound text box reflecting previous record
SEQ_NUM.
This unbound text field is called unbtxt_PREV_SEQ_NUM.

If user is on actual record Number 5 and previous record use was on was 4
then the
form would show current record SEQ_NUM of 5 for current record and 4 for
unbtxt_PREV_SEQ_NUM.

If user scrolls backwards, current record SEQNUM would be 4 and
unbtxt_PREV_SEQ_NUM would show 5. etc.

Also need to be able to add new records in update mode with ether an ADD NEW
RECORD COMMAND BUTTON or using >* arrow at navigation bar, and still be able
to keep SEQ_NUM current. When using DMAX on this function, I always get 21
in SEQ_NUM value instead of 6 if 6 would have been my next record.

I'm not VB code literate and would appreciate any information that could
resolve my deliema.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top