Tabbed Form (Main Form/Sub Form) multi-Table Problem

R

Robert Nusz @ DPS

I have a main form (FRF-CR-U) that has tabbed panels, with one panel a
sub-form (sbFRF-AOD-U). There are two record types: (table)
DPS_FR_CASE_RECORDS, is the primary Record with two part-key (4-digit
CASE_NUM_YR field and numeric CASE_NUM field) . Secondary table:
DPS_FR_CASE_OTHERS, with three part-key field (4-digit CASE_NUM_YR field,
numeric CASE_NUM field, and numeric SEQNO_NUM field). Secondary record links
to primary record based on matching CASE_YR & CASE_NUM values. There may or
may not be Secondary records in secondary record table.

I have form that prompts user for CASE_YR and CASE_NUM values, then executes
...

strSQL = "SELECT * From DPS_FR_CASE_RECORDS where CASE_NUM_YR = " &
Me.unbtxt_SEARCH_CASE_YR & " AND CASE_NUM = " & Me.unbtxt_SEARCH_CASE_NUM

to query table DPS_FR_CASE_RECORDS for matching data, if found, transfers
control to form FRF-CR_U to allow user to view select records in update mode.
Form FRF-CR_U opens with "DATA ENTRY = NO" control. The Subform
sbFRF-AOD-U will reflect secondary records when there are secondary records
to view, while the primary main form reflects data from primary table.

Problem is, when secondary table has "NO MATCHING RECORDS" this form fails
to load/open. The subform sbFRF-AOD-U attempts to query the secondary table,
but comes up with no records, and fails to open.

Is there someone who's been there, experienced that, did (something) to
resolve this no match issue on such an condition. If so, any suggestions
would be greatly appreciated.

Thanks in advance...
 

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