Access2007 not displaying subform from Access2000 application

W

Wyo_Developer

Trying to Upgrade to Access 2007 from Access 2000 and my subforms will not
display. Have Checked the Subforms Property Sheet and it is showing the
correct fields for Link Master Fields and Link Child Fields. The main form
displays the Payment DocumentID info, and the subform should display, in FORM
view, not datasheet view, the details for each payment line. I have Access
2000 on one PC and Access 2007 on a second PC and am comparing, properties
and not finding any changes. This occurred the first time I opened the .mdb
in Access 2007. I tried saving as an Access 2007 object, but same results.
BTW, I did not receive the message to "Enable Content" and the Main "menu
bar" does not indicate that this is compatibility mode after opening Access
2000 application. The Access 2000 applications are a front-end with the
tables in SQL Server 2005 back end. Anyone have any ideas?

More info:
In the “converted Access 2007 version, I made a copy of the main form with
the sub-form, then deleted the subform CONTROL, then “dragged†the subform
from the Navigation Bar to the Main Form. Main Form is named P1B, sub-form
P1BL. I then updated the Master & Child Link fields, saved the form and
tried to open the form again. I received the following:
Microsoft Visual Basic message
Voucher Processing(my Access application) can’t find the field ‘P1BL’
referred to in your expression.

Pointing to the following code, second line:

Private Sub DocAmount_Enter()
If Forms![P1B]![P1BL].Form![cmdSaveLine].Enabled = True Then ' ***(this line)
MsgBox "Plase save changes or delete this line."
DoCmd.GoToControl "P1BL"
Exit Sub
End If
Call CheckDocumentOnDocAmtEnter("P1B")
End Sub

I'm stumped! Thanks for any ideas.
 
D

Dale Fye

What is the name of the subform control on P1B? It should be [P1BL], but if
you just drag/dropped it on the form, the name property of the subform may be
blank (it was when I tried that).

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
W

Wyo_Developer

Thanks for that, when I first checked the subform CONTROL, I did not see that
it was named LINES from the source table, I guess?, so I changed to [P1BL],
but now it is acting just like the original, shows main form, but where the
subform should be is just a box, with only the background color showing. I'm
back to square one, converted database does not show the subform??

This is the VB code that executes to display the form/subform from the MAIN
form, does anything look wrong?

Private Sub lstVouchers_DblClick(Cancel As Integer)
Dim TT As String
If IsNull(Me.lstVouchers.Column(4)) Then
MsgBox "No voucher to open"
Exit Sub
End If
TT = Me.lstVouchers.Column(4)
DoCmd.OpenForm "" & TT
Forms("" & TT).RecordSource = "SELECT * FROM Documents WHERE DocumentID = "
& Me.lstVouchers
Forms("" & TT).txtSumLines = Nz(DSum("[LineAmount]", "Lines", "[DocumentID]
= " & Me.lstVouchers), 0)
Forms("" & TT).txtTotLines = DCount("[LineID]", "Lines", "[DocumentID] = " &
Me.lstVouchers)
If Forms("" & TT).txtDocAmount <> Forms("" & TT).txtSumLines Then
Forms("" & TT).lblError.Caption = "Totals don't match!"
Forms("" & TT).lblError.ForeColor = "255"
Else
Forms("" & TT).lblError.Caption = "Totals match!"
Forms("" & TT).lblError.ForeColor = "0"
End If
Forms("" & TT).Controls("" & TT & "L").Form.lstLines.Requery
End Sub

TT = Me.lstVouchers.Column(4) -- this has a value of "P1B", and the
[lstLines] field on the P1BL Sub-FORM is a multi-line List field with Record
Source =

SELECT Lines.LineID, Lines.LineNum AS Ln, Lines.InvoiceNum AS [Inv #],
Format([InvoiceDate],"mm/dd/yy") AS [Inv Date], Lines.Description,
Lines.LineAmount AS Amount, Lines.IncDec AS I, Lines.DocumentID
FROM Lines
WHERE (((Lines.DocumentID)=[Forms]![P1B]![DocumentID]))
ORDER BY Lines.LineNum;

I DO SEE the Subform P1BL for a very brief "flash" with empty fields, and
then the subform "is no longer visible". The INITIAL FLASH of the subform,
P1BL, does occur in the ACCESS 2000 version, but is then replaced with the
subform containing the data for the specific payment DOCUMENT/LINES records.

Dale Fye said:
What is the name of the subform control on P1B? It should be [P1BL], but if
you just drag/dropped it on the form, the name property of the subform may be
blank (it was when I tried that).

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.



Wyo_Developer said:
Trying to Upgrade to Access 2007 from Access 2000 and my subforms will not
display. Have Checked the Subforms Property Sheet and it is showing the
correct fields for Link Master Fields and Link Child Fields. The main form
displays the Payment DocumentID info, and the subform should display, in FORM
view, not datasheet view, the details for each payment line. I have Access
2000 on one PC and Access 2007 on a second PC and am comparing, properties
and not finding any changes. This occurred the first time I opened the .mdb
in Access 2007. I tried saving as an Access 2007 object, but same results.
BTW, I did not receive the message to "Enable Content" and the Main "menu
bar" does not indicate that this is compatibility mode after opening Access
2000 application. The Access 2000 applications are a front-end with the
tables in SQL Server 2005 back end. Anyone have any ideas?

More info:
In the “converted Access 2007 version, I made a copy of the main form with
the sub-form, then deleted the subform CONTROL, then “dragged†the subform
from the Navigation Bar to the Main Form. Main Form is named P1B, sub-form
P1BL. I then updated the Master & Child Link fields, saved the form and
tried to open the form again. I received the following:
Microsoft Visual Basic message
Voucher Processing(my Access application) can’t find the field ‘P1BL’
referred to in your expression.

Pointing to the following code, second line:

Private Sub DocAmount_Enter()
If Forms![P1B]![P1BL].Form![cmdSaveLine].Enabled = True Then ' ***(this line)
MsgBox "Plase save changes or delete this line."
DoCmd.GoToControl "P1BL"
Exit Sub
End If
Call CheckDocumentOnDocAmtEnter("P1B")
End Sub

I'm stumped! Thanks for any ideas.
 

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