Sam Summers
Registered User.
- Local time
- Today, 03:02
- Joined
- Sep 17, 2001
- Messages
- 939
Hello again,
I have a form 'WeeklyInspections' that i am opening with a an unbound combo box 'BuildingSelect' as the parameter on the form 'Selectionfrm'
A button opens the form 'WeeklyInspections' using this:
Private Sub WeeklyBtn_Click()
On Error GoTo WeeklyBtn_Click_Err
Dim stDocName As String
Dim stLinkCriteria As String
If IsNull(BuildingSelect) Then
DoCmd.Beep
MsgBox "Please select a Building", vbExclamation, "Selection required"
End
End If
stDocName = "WeeklyInspections"
stLinkCriteria = "[Building]='" & Me.BuildingSelect & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
' DoCmd.Close acForm, "Selectionfrm"
WeeklyBtn_Click_Exit:
Exit Sub
WeeklyBtn_Click_Err:
MsgBox Error$
Resume WeeklyBtn_Click_Exit
End Sub
---------------------------------------------------------------------------------------------------
The form 'WeeklyInspections' has four subforms on it all linked via 'BuildingID' to the main form (WeeklyInspections).
The Record Source for (WeeklyInspections) is from the table tblBuildings.
I can open (WeeklyInspections) on its own which displays everything perfectly by cycling through all the buildings using the navigation buttons but i want to display one building at a time and when i try this with the form 'Selectionfrm' i just get a blank form?
I have tried creating a query and also a parameter query but still just blank.
Data entry - No
Allow Additions - No
Allow Deletions - No
Allow Edits - Yes
Allow Filters - Yes
I'm missing something somewhere?
Many thanks in advance
Sam
I have a form 'WeeklyInspections' that i am opening with a an unbound combo box 'BuildingSelect' as the parameter on the form 'Selectionfrm'
A button opens the form 'WeeklyInspections' using this:
Private Sub WeeklyBtn_Click()
On Error GoTo WeeklyBtn_Click_Err
Dim stDocName As String
Dim stLinkCriteria As String
If IsNull(BuildingSelect) Then
DoCmd.Beep
MsgBox "Please select a Building", vbExclamation, "Selection required"
End
End If
stDocName = "WeeklyInspections"
stLinkCriteria = "[Building]='" & Me.BuildingSelect & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
' DoCmd.Close acForm, "Selectionfrm"
WeeklyBtn_Click_Exit:
Exit Sub
WeeklyBtn_Click_Err:
MsgBox Error$
Resume WeeklyBtn_Click_Exit
End Sub
---------------------------------------------------------------------------------------------------
The form 'WeeklyInspections' has four subforms on it all linked via 'BuildingID' to the main form (WeeklyInspections).
The Record Source for (WeeklyInspections) is from the table tblBuildings.
I can open (WeeklyInspections) on its own which displays everything perfectly by cycling through all the buildings using the navigation buttons but i want to display one building at a time and when i try this with the form 'Selectionfrm' i just get a blank form?
I have tried creating a query and also a parameter query but still just blank.
Data entry - No
Allow Additions - No
Allow Deletions - No
Allow Edits - Yes
Allow Filters - Yes
I'm missing something somewhere?
Many thanks in advance
Sam