Access 07 - Tabbed subform (continuous) - select records (1 Viewer)

NotherDumbNewbie

New member
Local time
Today, 07:19
Joined
Sep 10, 2012
Messages
1
hi,

probably a stupid question but I've tried modifying other solutions to no avail.

I have a tabbed form. On that tabbed form I have 8 tabs. Every tab has a subform on it.

My first tab is my main form where the user selects a control button to open various other forms using criteria from the first forms control button selected.

The overall form is frm_DataReporting
The Tab Control is TabCtl_DataReporting

The independent stand alone form that I made a subform on my Tabbed form is
frm_ShiftReportingLVL

That form as a subform resides on Name = Page4; Page Index 3
On that Tab the subform Name I changed to ShiftReportingLVL and it's source object is that frm_ShiftReportingLVL.

On the main tab I have a control button that launches this code...
Private Sub cmdMachPull_Click()
Dim LResponse As Integer, lngShiftLVLCtlID As Long


Me.cboSelectedLVLRptgType.RowSource = "SELECT LVLRptgTypeID, LVLRptgType FROM LVLReportingType WHERE (((LVLRptgType)=" & "'Machine Pull'" & "))" & ";"
Me.cboSelectedLVLRptgType = Me.cboSelectedLVLRptgType.ItemData(0)
lngShiftLVLCtlID = Val(36)
Call NewLVLControl

'Parent.Page2.SetFocus

'DoCmd.FindRecord "frm_ShiftReportingLVL", acNormal, , "ShiftRptgLVLCtlID =" & Me.txtNewShiftReportingLVLCtl
'Forms![frm_DataReporting]![frm_ShiftReportingLVL].Form![ShiftRptgLVLCtlID].RowSource = "SELECT ShiftRptgID, ShiftRptgLVLCtlID, RptgSeqID, LVLPositionNbr, AmtIn, AmtOut, NetAmt, AmtVal, MachinePulled, MachineClearChipped FROM ShiftReportingLVL WHERE ShiftRptgLVLCtlID =" & Forms![frm_DataReporting]![ ].Form![txtNewShiftReportingLVLCtl]
'Parent.Page4.SetFocus
Parent.Page4.SetFocus
Forms![frm_DataReporting]![ShiftReportingLVL].Form![AmtOut].SetFocus
'DoCmd.FindRecord "Forms![frm_DataReporting]![frm_ShiftReportingLVL].Form![ShiftRptgLVLCtlID].txtNewShiftReportingLVLCtl =" & Me.txtNewShiftReportingLVLCtl
' DoCmd.ApplyFilter , "ShiftRptgLVLCtlID = 36"
DoCmd.OpenForm "[ShiftReportingLVL]", , , "ShiftRptgLVLCtlID = " & lngShiftLVLCtlID



End Sub

As you can tell, I've tried several variations just trying to get it to work (ie: Findrecord and ApplyFilter).

The only way I can get it to work is if it opens the stand alone form not this as a subform on the tabbed form...

Guess I just don't understand.
 

Users who are viewing this thread

Top Bottom