Blank subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The subform is to receive new data, had been working and the subform Data
Entry property is set to "Yes"and all other form properties were default, yet
, now all of a sudden, if no record exists the subform is blank. A line of
code was written into the event procedure which sets the ".Visible" property,
for other subforms used in the form, that sets the subform's "DataEntry"
property to "Yes", but an error message pops up that says: Run time error
'438': Object doesn't support this property. All other ".Visible" settings
still work for all cases.
 
JimN said:
Should I restate the problem?

No. Newsgroup support doesn't come instantly, since no one is being
paid to answer questions here. I wouldn't conclude your question needs
to be restated until a day or two have gone by with no response.
 
JimN said:
The subform is to receive new data, had been working and the subform
Data Entry property is set to "Yes"and all other form properties were
default, yet , now all of a sudden, if no record exists the subform
is blank.

Generally this means that the subform's recordsource is not updatable,
and hence records can't be added. If existing records can't be
displayed, and records can't be added, then the form's detail section is
completely blank.. Assuming that the subform's recordsource is a query,
first determine whether that query is itself updatable, if opened
independently as a datasheet. Can you add records there?

If the query is updatable, make sure that the subform's AllowAddtions
property is set to Yes. Also check the properties of the main form.
Does it allow edits?
A line of code was written into the event procedure which
sets the ".Visible" property, for other subforms used in the form,
that sets the subform's "DataEntry" property to "Yes", but an error
message pops up that says: Run time error '438': Object doesn't
support this property. All other ".Visible" settings still work for
all cases.

What event procedure are you talking about? How about posting that
code?
 
The query that feeds the subform allows updates (I deleted and Added data to
the query fields). The AllowAdditions property is set to Yes on the Form and
subform. As I said this subform was working, but was not installed as a
working Form for users and it just quit working on the 1st of Jan. FYI The
code that was mentioned was to try and hammer the DataEntry into working
(Form!MasterFormName!SubformName.DataEntry = Yes. Wish there was more I could
tell you,
Jim
 
JimN said:
The query that feeds the subform allows updates (I deleted and Added
data to the query fields). The AllowAdditions property is set to Yes
on the Form and subform. As I said this subform was working, but was
not installed as a working Form for users and it just quit working on
the 1st of Jan. FYI The code that was mentioned was to try and hammer
the DataEntry into working (Form!MasterFormName!SubformName.DataEntry
= Yes. Wish there was more I could tell you,

So what else changed on 1 January? Is this a database you developed
yourself? If not, is there any chance it contains some code to restrict
access after the license period expires? Does the database make use of
user-level security, in which case maybe permissions to the form or
subform have been restricted?

If none of those questions brings anything to mind, then if you'd like
to send me a cut-down copy of your database, containing only the
elements necessary to demonstrate the problem, compacted and then zipped
to less than 1MB in size (preferably much smaller) -- I'll have a look
at it, time permitting. You can send it to the address derived by
removing NO SPAM from the reply address of this message.
 
Dirk,
I have a .34M cut down, zipped copy of the database I developed. I do not
know why I mentioned Jan 1, it must have been something subconscious. Your
reply address does not appear anywhere on any of the screens I get. If you
can, contact me : CaptainJim I am on hotmail. Thanks for your time.
Jim
 
JimN said:
Dirk,
I have a .34M cut down, zipped copy of the database I developed. I do
not know why I mentioned Jan 1, it must have been something
subconscious. Your reply address does not appear anywhere on any of
the screens I get. If you can, contact me : CaptainJim I am on
hotmail. Thanks for your time.

Okay, Jim, I've looked at it and found the problem. I'm not sure how it
happened, but you were mistaken when you said:

As you delivered the database to me, that query (StudentPaymentCurrent)
was nonupdatable, because it joined tables without primary keys.
Neither of the tables Payments nor [Prog/CourseDataCurrent] had a
primary key defined. I went into the table designs and arbitrarily set
the field RegisterReceiptNumber as the primary key for table Payments,
and [Course#SectSem] as the primary key for [Prog/CourseDataCurrent],
saved the changes, and *poof!* the query became updatable, and your
subform appeared on the form.even when it had no existing records to
display.

Of course, the fields I chose as primary keys may not be the ones you
would have chosen, but you'll have to set some field or fields in each
table as the primary key. Then your query will be updatable.
 
Dirk,
Fantastic, it all works as advertised. I appreciae your time and answer.
Take care out there,
Jim

Dirk Goldgar said:
JimN said:
Dirk,
I have a .34M cut down, zipped copy of the database I developed. I do
not know why I mentioned Jan 1, it must have been something
subconscious. Your reply address does not appear anywhere on any of
the screens I get. If you can, contact me : CaptainJim I am on
hotmail. Thanks for your time.

Okay, Jim, I've looked at it and found the problem. I'm not sure how it
happened, but you were mistaken when you said:

As you delivered the database to me, that query (StudentPaymentCurrent)
was nonupdatable, because it joined tables without primary keys.
Neither of the tables Payments nor [Prog/CourseDataCurrent] had a
primary key defined. I went into the table designs and arbitrarily set
the field RegisterReceiptNumber as the primary key for table Payments,
and [Course#SectSem] as the primary key for [Prog/CourseDataCurrent],
saved the changes, and *poof!* the query became updatable, and your
subform appeared on the form.even when it had no existing records to
display.

Of course, the fields I chose as primary keys may not be the ones you
would have chosen, but you'll have to set some field or fields in each
table as the primary key. Then your query will be updatable.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Back
Top