some subforms and combos blank

  • Thread starter Thread starter deb
  • Start date Start date
D

deb

When I open the fClosure form from a button on the f001ProjectReview form.
It opens the fClosure form but some of the comboboxs and some of the
subforms are blank. As in totally white. any ideas of why? If I open the
fClosure form without using the button on the f001ProjectReview form it
works fine.

Here is the button code I use to open form
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "fClosure"
stLinkCriteria = "[ProjectID]=" & Me![ProjectID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "f001ProjectReview"


The object is to find a project and make edits in f001ProjectReview and
click button to open a project closure form fClosure to enter closure data on
the current ProjectID.
 
When I open the fClosure form from a button on the f001ProjectReview form.
It opens the fClosure form but some of the comboboxs and some of the
subforms are blank. As in totally white. any ideas of why? If I open the
fClosure form without using the button on the f001ProjectReview form it
works fine.

Here is the button code I use to open form
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "fClosure"
stLinkCriteria = "[ProjectID]=" & Me![ProjectID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "f001ProjectReview"


The object is to find a project and make edits in f001ProjectReview and
click button to open a project closure form fClosure to enter closure data on
the current ProjectID.

A form will appear totally blank if two conditions are true: the form's
Recordsource returns no records (so there are no existing records to see), and
the form does not allow new records to be created (either the Recordsource is
not updateable or the form's Allow Additions property is false), so you can't
see the empty new record either.

What's the datatype of ProjectID? If you step through the code what is in
stLinkCriteria? Does the value in fact have records in the table upon which
the fClosure is based? What's fClosure's Recordsource?
 
Access2003
The subform does have data, so the subforms should not be blank.
The problem only occurs when I open the form from a button on a defferent
form and pass it the ProjectID(Numeric type).

Recordsource of fClosure is t040Project. Which contains;;;
SELECT t040Project.ProjectID, t040Project.ProjectName, t040Project.Scope,
t040Project.ProjStatusID, t040Project.ProjCategory, t040Project.ContactPMID,
t040Project.ContactPMgrID
FROM t040Project;

I did ?forms![fclosure]![fClosureUnits].form![projectid] and it come back
with error 2467-The expression you entered refers to an object that is closed
or doesn't exist.
When I open the form directly(not form other form's button) the error does
not occur.

All of my subforms have a field for ProjectID and it is not blank.

I tried deleting and re-addign the subforms to the mainform.
I tried deleting the LinkMaster and LinkChild fields and re-adding them.
I did compact and repair.
I turned off auto correct names.

Not sure what to do next.
Like I mentioned it only happens if I open this form from another form. If
I open the form directly, it works perfectly.

Please help!!
--
deb


John W. Vinson said:
When I open the fClosure form from a button on the f001ProjectReview form.
It opens the fClosure form but some of the comboboxs and some of the
subforms are blank. As in totally white. any ideas of why? If I open the
fClosure form without using the button on the f001ProjectReview form it
works fine.

Here is the button code I use to open form
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "fClosure"
stLinkCriteria = "[ProjectID]=" & Me![ProjectID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "f001ProjectReview"


The object is to find a project and make edits in f001ProjectReview and
click button to open a project closure form fClosure to enter closure data on
the current ProjectID.

A form will appear totally blank if two conditions are true: the form's
Recordsource returns no records (so there are no existing records to see), and
the form does not allow new records to be created (either the Recordsource is
not updateable or the form's Allow Additions property is false), so you can't
see the empty new record either.

What's the datatype of ProjectID? If you step through the code what is in
stLinkCriteria? Does the value in fact have records in the table upon which
the fClosure is based? What's fClosure's Recordsource?
 
When I open the fClosure form from a button on the f001ProjectReview form.
It opens the fClosure form but some of the comboboxs and some of the
subforms are blank. As in totally white. any ideas of why? If I open the
fClosure form without using the button on the f001ProjectReview form it
works fine.

Here is the button code I use to open form
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "fClosure"
stLinkCriteria = "[ProjectID]=" & Me![ProjectID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "f001ProjectReview"


The object is to find a project and make edits in f001ProjectReview and
click button to open a project closure form fClosure to enter closure data on
the current ProjectID.

Put a breakpoint on the openform line. What's the value of stLinkCriteria?
Does it contain a valid ProjectID value, one that exists in the table?

Are there any Lookup fields on either the calling or the called form?
 
The Locals window shows
stDocName is fClosure
stLinkCriteria is "[ProjectID]=291"

Yes on the fClosure form I have ...
'If DLookup("[MSPContactID]", "[t41ContactsMSP]", "[MSPContactUserID] = '" &
Environ("username") & "'") = Me.ContactPMgrID And _
'Not IsNull(Me!fClosureApproval.Form.SignaturePM) And _
'IsNull(Me!fClosureApproval.Form.ApprovedByMgr) Then
' Me!fClosureApproval.Form.btnApprClose.Visible = True
' Me!fClosureApproval.Form.btnReqClarify.Visible = True
'Else
' Me!fClosureApproval.Form.btnApprClose.Visible = False
' Me!fClosureApproval.Form.btnReqClarify.Visible = False
'End If

but I commented it out and tried again. it is erroring out on the fClosure
form at the Resume Resume Exit_Current_err with error# 2467
current_err:
If Err.Number = 2455 Then
On Error Resume Next
Else
MsgBox Err.Description
Resume Exit_Current_err
End If

the subforms and comboboxes are stillblank.

It is making me crazy!!
--
deb


John W. Vinson said:
When I open the fClosure form from a button on the f001ProjectReview form.
It opens the fClosure form but some of the comboboxs and some of the
subforms are blank. As in totally white. any ideas of why? If I open the
fClosure form without using the button on the f001ProjectReview form it
works fine.

Here is the button code I use to open form
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "fClosure"
stLinkCriteria = "[ProjectID]=" & Me![ProjectID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "f001ProjectReview"


The object is to find a project and make edits in f001ProjectReview and
click button to open a project closure form fClosure to enter closure data on
the current ProjectID.

Put a breakpoint on the openform line. What's the value of stLinkCriteria?
Does it contain a valid ProjectID value, one that exists in the table?

Are there any Lookup fields on either the calling or the called form?
 
deb said:
When I open the fClosure form from a button on the f001ProjectReview form.
It opens the fClosure form but some of the comboboxs and some of the
subforms are blank. As in totally white. any ideas of why? If I open
the
fClosure form without using the button on the f001ProjectReview form it
works fine.

Here is the button code I use to open form
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "fClosure"
stLinkCriteria = "[ProjectID]=" & Me![ProjectID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "f001ProjectReview"


The object is to find a project and make edits in f001ProjectReview and
click button to open a project closure form fClosure to enter closure data
on
the current ProjectID.
 
deb said:
When I open the fClosure form from a button on the f001ProjectReview form.
It opens the fClosure form but some of the comboboxs and some of the
subforms are blank. As in totally white. any ideas of why? If I open
the
fClosure form without using the button on the f001ProjectReview form it
works fine.

Here is the button code I use to open form
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "fClosure"
stLinkCriteria = "[ProjectID]=" & Me![ProjectID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "f001ProjectReview"


The object is to find a project and make edits in f001ProjectReview and
click button to open a project closure form fClosure to enter closure data
on
the current ProjectID.
 
Back
Top