Subform not allowing data entry

  • Thread starter Thread starter Incolor
  • Start date Start date
I

Incolor

Hi All,

I have a form with two subforms that I cannot get to work just right as
far as the data entry part of it. Here are the tables and details. The
table questionnaire is the main table. The others are lookups. The main
form has the information in the lookup reports table, the first subform
has information from the lookup quest section table and the second
subform has information on the lookup quest details table. Basically,
for four different sections you have several yes/no questions for the
property and adjoining property. I want the form to show and allow me
to enter the main form information and the answers to the questions for
each section. Right now, I see the main form information and the
question section and the question details, but cannot enter any
information in the question details part I get a message the primary
key cannot be null. I just can't see the issue anymore. Thanks in
advance!!

LU_QUEST_SEC
PK SEC_ID
SEC_DESC

LU_QUEST_DETAILS
PK QUEST_DETAIL_ID
QUEST_DESC
SEC_ID
ORDER_NUMBER

LU_REPORTS
REPORT_ID
ADDRESS
NAME
ASSOC_W_SITE
HOW_LONG
PK SITE_NAME
INSPECTOR_ID
CURRENT_USE
PAST_USES
DRINK_WATER_SOURCE
SERVED_BY
HEATING_COOLING
FUEL_SOURCE

LU_INSPECTOR
PK INSPECTOR_ID
INSPECTOR

TBL_QUESTIONNAIRE
QUEST_ID
SITE_NAME
ADDRESS
NAME
ASSOC_W_SITE
HOW_LONG
CURRENT_USE
PAST_USES
DRINK_WATER_SOURCE
SERVED_BY
HEATING_COOLING
FUEL_SOURCE
PK QUEST_DETAIL_ID
SEC_ID
PK REPORT_ID
YES
NO
YES_ADJ
NO_ADJ
 
I'm not positive that I have the answer to this since I am still working out
some bugs with my main form/subform. But, I was having a similar problem
with two fields in my main form. The subform is placed before those two
fields and if I tried to enter the subform without first entering data into
those two fields I got the same error. Try placing the field where the data
is null before the tab to enter the subform. This will fill the key value
that is missing in the main form and then allow you to move on to the
subform. Hope this helps!

Coleen
 
Back
Top