Detail Section Disappears

  • Thread starter eschlep via AccessMonster.com
  • Start date
E

eschlep via AccessMonster.com

When i place things in the form header and fooder nothing is shown in the
detail section. I can have text boxes labels, controls, records or anything
in the detail section but it will not display it. In the properties visible
is set to yes and display is always on both the detail section and the form.
How can i get the detail section to display agian.
 
E

eschlep via AccessMonster.com

Also i am using a combo box and command button. I think it may have to do
with the record set but i dont know and i dont know how it fix it if thats
the problem. My code is
Option Compare Database

Private Sub cmdPrint_Click()

Dim strReportName As String
Dim strCriteria As String

If NewRecord Then
MsgBox "This record contains no data. Please select a record to print
or Save this record." _
, vbInformation, "Invalid Action"
Exit Sub
Else
strReportName = "LNREVIEWQ33"
strCriteria = "[Field2]= '" & Me![Field2] & "'"
'strCriteria = "[lngSalespersonID]='" & Me![lngSalespersonID] & "'"

DoCmd.OpenReport strReportName, acViewPreview, , strCriteria

End If
End Sub


Private Sub Field2_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Field2] = '" & Me![Field2] & "'"
Me.Bookmark = rs.Bookmark
End Sub

Private Sub Combo48_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Field2] = '" & Me![Combo48] & "'"
Me.Bookmark = rs.Bookmark
End Sub

Private Sub FormFooter_Click()

End Sub
 
A

Allen Browne

The Detail section of a form goes completely blank if both these conditions
are met:
a) There are no records to display, and
b) No new records can be added.

(a) can be due to an empty table, a query that returns no records, or a
filter or WhereCondition applied when opening the form. It also happens if
you set the form's Data Entry property to Yes.

(b) can be due to the form being based on a read-only query. It also happens
if you set the form's AllowAdditions property to No, or set its RecordSource
type to anything other than Dynaset. Or it could happen if the database is
opened read-only, or if the user does not have adequate permissions.

A simple way to demonstrate the problem is to set the form's AllowAdditions
to No, and DataEntry to Yes.

When it does occur, the controls in the Form Header and Form Footer are
still visible, but they don't behave properly. This is one of the issues
discussed in this article:
Incorrect display of data
at:
http://allenbrowne.com/bug-06.html

You can test if the source query is read only by opening it directly and
trying to edit or add records there. If you find you have a problem there
and don't understand why, see:
Why is my query read-only?
at:
http://allenbrowne.com/ser-61.html
 

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