disappearing text box and buttons

J

Jeffrey Harris

I have a form I've created. When the form's .RecordSource property is set
such that no records are returned a text box and some buttons on the form
disappear. If there are records returned everything is as should be. Has
anyone seen this before? And how do I fix it?

Here's some background info on my how my form works (maybe I'm doing
something wrong that is causing this).

I have two list boxes.. ComputerList and SubjectList and a subform
Comments_Form.

When an item in ComputerList is selected ComputerList_AfterUpdate() runs and
sets
Me.SubjectList.RowSource = "SELECT SubjectID, SubjectTitle FROM Subjects
WHERE ComputerID=" & Me.ComputerList & ";"

When an item in SubjectList is selected SubjectList_AfterUpdate() runs and
sets
Me.Comments_Form.Form.RecordSource = "SELECT * FROM Comments WHERE SubjectID
= " & Me.SubjectList & ";"

In the subform I have a textbox and a couple of buttons. If the subform
recordsource returns any rows then the textbox and buttons are shown. For
some reason, if no rows are returned then the text box and buttons are not
displayed.

If interested, the database can be found at
http://www.harriscomputersolutions.com/~jeff/computer.mdb


Any help is appreciated.
Jeff
 
T

TC

I have a form I've created. When the form's .RecordSource property is set
such that no records are returned a text box and some buttons on the form
disappear. If there are records returned everything is as should be. Has
anyone seen this before? And how do I fix it?

(snip)

This will happen if the AllowAdditions property of the form is False. If
there are no existing records to display, and you have said (via that
property) that the user should not be able to add new records, Access will
say to itself, "Gee, I can't even display a blank record". So it will not
display the Detail section of the form, at all.

HTH,
TC
 

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